MathGroup Archive 1998

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

Search the Archive

first usage of a button

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13676] first usage of a button
  • From: "jmthomas" <jmthomas at R8M82.CYBERCABLE.TM.FR>
  • Date: Sat, 15 Aug 1998 04:39:09 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

In order to standardize the use of notebooks for non-specialist people,
I have built the following button, that sets the working directory to
the notebook directory. (Other versions can also read a initialization
file).

Cell[BoxData[
    FormBox[
      ButtonBox["SetWorkingDirectory",

tonFunction:>SetDirectory[ 
            DirectoryName[ 
              Module[ {pathName}, 
                ToFileName[ 
                  ReplaceAll[ "FileName", 
                    NotebookInformation[ 
                      ButtonNotebook[ ]]]]]]],
        ButtonEvaluator->Automatic,
        Active->True,
        ButtonStyle->None,
        ButtonNote->"init"], Null]], "Input"]

The button works fine but in one case: when Mathematica has just been
started (with an autoloaded kernel) and the notebook just been opened,
I get a message (from the FrontEnd): "Evaluation Nonstandard Form:
Warning: You are giving input whcich is not InputForm or StandardForm,
etc. " and people can choose between "Cancel" and "Evaluate" Choosing
"Evaluate" performs a correct task, but for first-time users my
notebook does not look like a "click and go" notebook! The message also
suggests to use "convert", which leads to a disaster, ruining the
button itself.

What can I do to have a clean button?


**************************************** 
Jean-Marie THOMAS
Conseil et Audit en Ingnierie de Calcul Strasbourg, France
**************************************** 



  • Prev by Date: Dimensions and Variables II
  • Next by Date: Running 3.0 remotely
  • Previous by thread: Re: Dimensions and Variables II
  • Next by thread: Re: first usage of a button