MathGroup Archive 2001

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

Search the Archive

Problem with context creation in packages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30456] Problem with context creation in packages
  • From: "Emilio Martin-Serrano Sobrino" <emilio.martin at sema.es>
  • Date: Wed, 22 Aug 2001 01:41:53 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

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.
------------------------------------------------------------------


  • Prev by Date: Re: NIntegrate and Plot
  • Next by Date: Re: Re: Rotation3D, MatrixRotation3D ?
  • Previous by thread: Mathematica & Wavelets ...
  • Next by thread: Re: Problem with context creation in packages