[Date Index] [Thread Index] [Author Index]
Re: Evaluate Initialization button?
On Mon, 19 Nov 2001, Gianluca Gorni wrote: > 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? It would have been helpful if you would have posted the code you were using. I suspect that you were attempting to use a front end token as if it were a function. Here is probably what you need to do. ButtonBox[ "Click me to load package", ButtonFunction :> FrontEndExecute[FrontEndToken["EvaluateInitialization"]], ButtonEvaluator -> None, Active -> True ] -- P.J. Hinton User Interface Programmer paulh at wolfram.com Wolfram Research, Inc. Disclaimer: Opinions expressed herein are those of the author alone.