MathGroup Archive 2004

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

Search the Archive

webMathematica and loss of context

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51214] webMathematica and loss of context
  • From: flip phillips <flip at skidmore.edu>
  • Date: Fri, 8 Oct 2004 02:55:19 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

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: no line PlotStyles with ParametricPlot3D ?
  • Next by Date: Re: Problem with Maximize and conditions.
  • Previous by thread: Re: Need Help: 1st order nonlinear differential equation
  • Next by thread: Re: webMathematica and loss of context