Re: Evaluate Initialization button?
- To: mathgroup at smc.vnet.net
- Subject: [mg31669] Re: Evaluate Initialization button?
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Fri, 23 Nov 2001 05:47:02 -0500 (EST)
- References: <9th9tr$go8$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Gianluca,
You need a front end token.
Evaluate the following to get the sort of button that you want:
Button["Click Me First",
ButtonFunction :> FrontEndExecute[
FrontEndToken[
ButtonNotebook,
"EvaluateInitialization" ]],
ButtonEvaluator -> "Automatic", Active -> True]
--
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
"Gianluca Gorni" <gorni at dimi.uniud.it> wrote in message
news:9th9tr$go8$1 at smc.vnet.net...
>
> Hello!
>
> I have written a notebook containing a package and example applications.
> I would like to make the package available to beginner Mathematica
> users that have no idea of what packages or initialization cells.
>
> The package is contained in the notebook's initialization cells, inside
> a closed cell group.
>
> What I have in mind is a well-visible, active button that says
>
> "click me to load package"
>
> and that triggers "evaluate initialization" from the Kernel menu. Just
that.
>
> I browsed the on-line help but without luck. It seems that
> "EvaluateInitialization" is not among the available commands.
>
> Anybody knows how to do that? Or something to the same effect?
>
> Thank you in advance,
>
> Gianluca Gorni
>
>
> --
>
>
> +---------------------------------+
> | Gianluca Gorni |
> | Universita` di Udine |
> | Dipartimento di Matematica |
> | e Informatica |
> | via delle Scienze 208 |
> | I-33100 Udine UD |
> | Italy |
> +---------------------------------+
> | Ph.: (39) 0432-558422 |
> | Fax: (39) 0432-558499 |
> | mailto:gorni at dimi.uniud.it |
> | http://www.dimi.uniud.it/~gorni |
> +---------------------------------+
>
>
>