MathGroup Archive 2004

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

Search the Archive

Re: webMathematica and loss of context

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51219] Re: webMathematica and loss of context
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 9 Oct 2004 04:18:31 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <ck5evt$oo1$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

for security reasons webMathematica remove all objects in the
Global` context. In your MathLink program *and* in your package
you must give all symbols the proper context (not Global`)

The usual is that you get patterns/symbols with Removed[someSymbol]
and this match not more to the functions you have defined in your package.

I had the same problem when I try MathGL3d with webMathematica
for the first time.

Regards
  Jens

"flip phillips" <flip at skidmore.edu> schrieb im Newsbeitrag 
news:ck5evt$oo1$1 at smc.vnet.net...
>I have a strange situation that is clearly pilot error and was
> wondering if this was something others have seen before / could
> identify a place to look for a solution.
>
> I have a package called "Human`". Human is a MathLink executable
> (Fortran of all things :) and a bunch of .m wrapper and support
> routines. (It isn't important here, but it is a very complete human
> physiological model I am helping a fellow faculty migrate to
> Mathematica) It is put together in traditional WRI recommended style.
> There is an init.m with DefinePackage[], etc. I'm skeptical the
> MathLink component is causing any problem, but include a reference to
> it for completeness.
>
> I have included it as part of a webMMa 2.1 page (generated via the
> excellent webMMa author palette) via Needs["Human`"]
>
> The first time through everything works as expected. The executable
> (called MHuman) launches, the MathLink communication takes place,
> answers are returned, joy is obtained.
>
> The -second- time  the page is evaluated there is a seeming problem.
> All of the Human routines have now lost their space in the global
> context and don't evaluate. I verified this by embedding a call to
> Names["Human`*"] within the page. The first time through, Names[]
> returns all of the un-context-qualified names, i.e. HumanRun,
> HumanCondition, HumanKill (I know, I know...) and all works as
> advertised...
>
> The second time through, however, the call to Names[] returns
> Human`Being`HumanRun, Human`Being`HumanCondition, etc... and calls to
> HumanRun[10] return unevaluated.
>
> Restarting the kernel through the KernelMonitor allows me to run it
> once again, etc.
>
> Is there somewhere obvious I am missing?
> 



  • Prev by Date: Re: normal distribution random number generation
  • Next by Date: Re: Re: Re: No more memory available
  • Previous by thread: webMathematica and loss of context
  • Next by thread: Very basic question: Zoom into a 2-D plot with the mouse