RE: Re: Problem with context creation in packages
- To: mathgroup at smc.vnet.net
- Subject: [mg30497] RE: [mg30467] Re: Problem with context creation in packages
- From: "Emilio Martin-Serrano Sobrino" <emilio.martin at sema.es>
- Date: Fri, 24 Aug 2001 04:05:56 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Thanks, and sorry, Allan, I fixed the misspelling in the context names: I had checked them out many times before posting the question, but without success, the missing "n" in "Trasition" was very elusive (but these things happen, specially when misspellings occur to second language users). Now everything goes perfectly. Thanks again. Emilio <Emilio, < <The local name of the package file: < "Islm`EquilibriumStageTransitionISLM`" <and the package context: < "Islm`EquilibriumStageTrasitionISLM`" <should be the same <-- <Allan <--------------------- <Allan Hayes <Mathematica Training and Consulting <Leicester UK <www.haystack.demon.co.uk <hay at haystack.demon.co.uk <Voice: +44 (0)116 271 4198 <Fax: +44 (0)870 164 0565< "Emilio Martin-Serrano Sobrino" <emilio.martin at sema.es> wrote in message news:9lvgum$4o3$1 at smc.vnet.net... > Hi: > > I am trying to load two packages with the following headings: > > 1 -> > BeginPackage["Islm`EquilibriumStageTrasitionISLM`","Utilities`ISLMmodel`"] > > 2 -> BeginPackage["Islm`ISLMFunctions`","Utilities`ISLMmodel`","Islm` > EquilibriumStageTransitionsISLM`"]. > > When I invoke these packages within a notebook I get this > > In[1] := Needs["Islm`EquilibriumStageTransitionISLM`"] > Out[1]:= Needs::nocont: Context Islm`EquilibriumStageTransitionISLM` was not > created when Needs was evaluated. > > In[2]:= Needs["Islm`ISLMFunctions`"] > Out[2]:= Needs::nocont: Context Islm`EquilibriumStageTransitionISLM` was not > created when Needs was evaluated. > > However, if I execute > > In[6]:=?Islm`EquilibriumStageTrasitionISLM`* > > I can see that all the symbols in the package have been created, (and the > same for In[7]:= ?Islm`ISLMFunctions`* ) > > And, If I execute > > In[8]:= $ContextPath > Out[8]:= > {Islm`ISLMFunctions`,Islm`EquilibriumStageTrasitionISLM`,Utilities`ISLMmodel > `, ............} > > Which tells me the target context names have been put in the ContextPath. > (Why so, if the context has not been created?) > > Then, I check all the functions and symbols in these packages and all them > (but two) seem to work perfectly. The two symbols that do not work are in > the package *Islm`ISLMFunctions* and they use two symbols imported from > the package *Islm`EquilibriumStageTrasitionISLM* (remember, it is the one > whose context was no created). And this seems to be the reason why these two > symbols do not work, since the imported symbols from the package > *Islm`EquilibriumStageTrasitionISLM* are re-declared as private in the > package *Islm`ISLMFunctions*. I think this re-declaration `informs` that > the imported symbol has not been found because the corresponding context > does not actually exist. > > The two packages *Islm`EquilibriumStageTrasitionISLM`* and > *Islm`ISLMFunctions`* use symbols and functions in equivalent syntactical > positions to the one that is re-declared, but these symbols that work ok > come from the other packages, and everything goes OK. > > Of course, I did not get any other error message o warnings on syntactical > problems. > > Could anyone give a clue on the apparent contradiction. > > Emilio Martin-Serrano > > > > ------------------------------------------------------------------ > This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of SchlumbergerSema. > If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. > ------------------------------------------------------------------ > ------------------------------------------------------------------ This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of SchlumbergerSema. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. ------------------------------------------------------------------