MathGroup Archive 1998

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

Search the Archive

Button Function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14467] Button Function
  • From: "Jean-Marie THOMAS" <jmthomas at agat.net>
  • Date: Fri, 23 Oct 1998 20:58:45 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

If I create a button:
Module[{b},
b=ButtonBox["Press",ButtonFunction:>Quit[],ButtonEvaluator->Automatic,
      ButtonStyle->None,Active->True];
CellPrint[Cell[BoxData[b],"Input"]]
]
and then press the button, the kernel quits, which is what was being
expected. Note that evaluation is sent to a kernel, not to the
FrontEnd.

But, with this button (same as before but Return[] replaces Quit[]):
Module[{b},
b=ButtonBox["Press",ButtonFunction:>Return[],ButtonEvaluator->Automatic,
      ButtonStyle->None,Active->True];
CellPrint[Cell[BoxData[b],"Input"]]
]
the Return[] function does not return from a dialog: Evaluating:
Dialog[]
and then pressing the button
does not cause the kernel to return from the dialog. I have to evaluate
(by hand, meaning Return[]ENTER) to be back in the main loop. Can
someone explain me the differences between an evaluation in a button
and a "standard" evaluation?


**************************************** 
Jean-Marie THOMAS
jmthomas at agat.net
Conseil et Audit en Ingnierie de Calcul Strasbourg, France
http://www.agat.net
****************************************



  • Prev by Date: RE: fractals
  • Next by Date: Re: FourierTransform on UnitStep
  • Previous by thread: Re: Importing Dos Data into Linux Mathematica?
  • Next by thread: Printing Problems under Windows 98