Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: Problem with context creation in packages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30467] Re: Problem with context creation in packages
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Thu, 23 Aug 2001 02:15:32 -0400 (EDT)
  • References: <9lvgum$4o3$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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




  • Prev by Date: Re: Encoded Mathematica Files
  • Next by Date: Re: Re: Re: Rotation3D, MatrixRotation3D ?
  • Previous by thread: Problem with context creation in packages
  • Next by thread: RE: Re: Problem with context creation in packages