Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

BeginPackage and $ContextPath Blues (6.0.2)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86324] BeginPackage and $ContextPath Blues (6.0.2)
  • From: Tom Aldenberg <Tom.Aldenberg at rivm.nl>
  • Date: Sat, 8 Mar 2008 05:43:29 -0500 (EST)

Hi Mathgroup,

Running Mathematica 6.0.2 on XP, I maintain three related packages:
BusyFunc20a04.m, BusyDraw20a04.m, and BusyMain20a04.m,
respectively starting thus:

BeginPackage["BusyFunc20a04`"]

BeginPackage["BusyDraw20a04`", "BusyFunc20a04`"]

BeginPackage["BusyMain20a04`", "BusyFunc20a04`", "BusyDraw20a04`", \
"MathProg`Classes`"]

These are written as m-code files directly, not via Notebooks.


In a testing Notebook, after invoking :

Get["BusyMain20a04`"]

I receive a warning that Symbol Methods appears in multiple contexts
{"MathProg`Classes`", "JLink`"}. Methods turns red in a Notebook,
but works as intended for Roman Maeder's Classes. Tthe $ContextPath is

{"BusyMain20a04`", "MathProg`Classes`", "BusyDraw20a04`", \
"BusyFunc20a04`", "DocumentationSearch`", "ResourceLocator`", \
"JLink`", "PacletManager`", "WebServices`", "System`", "Global`"}

So far, so good.


After evaluating Quit[] in the Notebook, but not leaving Mathematica,
I may, again after Get["BusyMain20a04`"], receive no warnings at all,
with $ContextPath:

{"BusyMain20a04`", "MathProg`Classes`", "BusyDraw20a04`", \
"BusyFunc20a04`", "PacletManager`", "WebServices`", "System`", \
"Global`"}

hence, without JLink`. Now the Classes-defined Methods does not work,
however, despite the Path.

After menu Evaluation Quit Kernel (local), or after Quit[],
I may also get a different $ContextPath, again without warning on Methods:

{"DocumentationSearch`", "ResourceLocator`", "JLink`", \
"BusyMain20a04`", "MathProg`Classes`", "BusyDraw20a04`", \
"BusyFunc20a04`", "PacletManager`", "WebServices`", "System`", \
"Global`"}

Obviously, Methods doesn't work either. This may also happen
after a fresh start of Mathematica (not leaving Windows).

Kind regards,

Tom Aldenberg
____________________________________________________________________________

DISCLAIMER:  http://www.rivm.nl/disclaimer.htm



  • Prev by Date: Re: Rotation of 3D objects
  • Next by Date: Re: changing style of vertices for ShowGraph with Combinatorica
  • Previous by thread: Re: Extracting the contents of tagged cells as plain text
  • Next by thread: Path to *.m file