MathGroup Archive 2008

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

Search the Archive

Re: Run initialization cells before dynamic cells

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94388] Re: Run initialization cells before dynamic cells
  • From: Damon <damonwischik at gmail.com>
  • Date: Thu, 11 Dec 2008 07:27:32 -0500 (EST)
  • References: <200812081124.GAA15930@smc.vnet.net> <ghlmbc$jnt$1@smc.vnet.net>

On Dec 11, 8:44 am, Albert Retey <a... at gmx-topmail.de> wrote:
> Hm, the documentation is not perfectly clear on this, but I think what
> you need is the option Initialization, which Dynamic understands as well
> as DynamicModule which you really should look at if you are looking for
> an alternative to Manipulate with more control. Actually I think
> Manipulate with SaveDefinitions-> True will just create a DynamicModule
> with the Initialization option set appropriatly. Of course to enclose
> all relevant definitions automtatically as Manipulate does you will need
> some extra code...

I tried this. In my original post, I said I tried

Dynamic[CleverDisplay[...], Initialization :> FrontEndExecute
[FrontEndToken["EvaluateInitialization"]] ]

but (a) it doesn't work, i.e. the initialization cells are not
evaluated until I shift+enter to evaluate some cell in the notebook,
and (b) if I have several of these, I'm worried it will try to execute
the initialization cells several times.

I don't want to include _all_ the relevant definitions in this
Initialization option, because I have several Dynamic[] cells, and
it's redundant to duplicate the options. I'm not clever enough to work
out the code that Manipulate uses to automatically work out which
terms to enclose, and I was hoping someone could help with that.

I posted in another message that I realized a solution: I can just use
Manipulate and tell it not to display any of its normal controls, and
then it's just like a Dynamic[] except that it lets me use
SaveDefinition.

Damon.


  • Prev by Date: Re: Clever way to manipulate lists
  • Next by Date: D
  • Previous by thread: Re: Run initialization cells before dynamic cells
  • Next by thread: Re: Run initialization cells before dynamic cells