Re: CellContext - Not ready for primetime use (opinion).
- To: mathgroup at smc.vnet.net
- Subject: [mg116016] Re: CellContext - Not ready for primetime use (opinion).
- From: John Fultz <jfultz at wolfram.com>
- Date: Sat, 29 Jan 2011 05:26:54 -0500 (EST)
I independently discovered some wonkiness with contexts and
NotebookEvaluate a couple of months ago and discussed it with the
developer of NotebookEvaluate at that time. I couldn't remember the
resolution, so I just tried your basic example in the development version
of 8.0.1 to see if the problem remains, and it doesn't. 8.0.1 will be
coming out pretty soon, so you should see a remedy to that issue soon.
That having been said, though, you bring up several other issues (the
docked cell issue, the CellProlog issue) without accompanying examples
which I didn't test. The underlying logic is sophisticated, so it's
difficult for me to saywith any real certainty whether the context issues
have been completely squished here. But if you would like to send me
other examples, I'm happy to try themout and follow up on anything that's
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.
On Fri, 28 Jan 2011 06:13:36 -0500 (EST), Jason Ledbetter wrote:
> Are any of you using CellContext with a user specified string
> e.g., CellContext->"someThing`".
> I've read the various threads on mathgroup that say "don't use that", but
> I'm sometimes stubborn. :-)
> I think I've come to the conclusion that CellContext just isn't ready for
> prime-time use outside of what WRI is using it for, despite it being in
> documentation. Wolfram's support has been of very limited assistance as
> everything they come up with takes two steps back.
> Here's a simple example:
> In the resulting document execute:
> You'll observe that the result is "mine`" which exactly matches the
> documentation and that the $ContextPath has been changed to include
> and mine`.
> Let's suppose you want to now customize something in the resulting
> like customize $ContextPath. The obvious way would be NotebookWrite and
> NotebookEvaluate (this was a solution provided by some DatabaseLink
> developer @ Wolfram)...
> Back in the original notebook execute the following and watch the results=
> The Context/ContextPath get changed back to Global`... which means
> written to that document and executed through NotebookEvaluate
> tears down any explicit context/path that was setup through other
> (like CellProlog).
>  This brings up a couple of issues.. for example customizing
> without user intervention to include things like DatabaseLink`, etc.
>  This leads to other novel problems... DockedCells get a different
> context/path than that of the notebook itself resulting in situations
> buttons in the dock only do the correct thing on their second action...
Prev by Date:
Re: Odd Behavior of GraphicsRow and GraphPlot
Next by Date:
Re: Simple n-tuple problem - with no simple solution
Previous by thread:
CellContext - Not ready for primetime use (opinion).
Next by thread:
Re: Declaring the golbal variables in Packages