-Follow-Up
- To: mathgroup at smc.vnet.net
- Subject: [mg9618] [mg9516]-Follow-Up
- From: Adalbert Hanssen <hsse at amath01.amath.zeiss.de>
- Date: Fri, 14 Nov 1997 21:39:58 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Dear Mathgroup, this is a follow-up-question to the Needs-discussion of [mg9516]: I have to keep compatibility of with old Mathematica-installations and packages developed for them. On a Mathematica3-system running under Win-NT, we have long filenames, on the old systems "8.3"-filenames. The old packages however used context names longer than 8 characters, which did not hurt, because there was ContextToFilename, shortening contextnames to the filename convention. Now I want the context loading mechanism Needs - if it was unsucessful loading a required context according to the new default-translation of context-names to Filenames - then try truncating the contextname according to the old convention and retry loading a package that way before giving up. This way, I might gradually migrate my packages to the new environment: using new capabilities in the new environment in rewritten packages with long names - if available - and using the old ones also on the new system without changing their filenames. I know, this deals with overloading Needs with something new. But can I refer to the "old" definition of Needs inside a redefinition in the manner Unprotect[Needs]; Needs[context_]:= Module[{.....} ,Needs[...] (* here I mean the "old" Needs, which I am just overwriting *) .... ]; Protect[Needs]; ? The other question is, where such a redefinition is placed best. There are many init.m. Which one would be best for it? Thanks in advance, Dipl-Math. Adalbert Hanszen <hsse at amath01.amath.zeiss.de>