MathGroup Archive 2003

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

Search the Archive

Re: Aborting an evaluation with a button

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41705] Re: [mg41522] Aborting an evaluation with a button
  • From: Omega Consulting <info at omegaconsultinggroup.com>
  • Date: Sat, 31 May 2003 06:07:56 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

At 12:05 AM 5/24/2003, SEPULVEDA,ARIEL (HP-PuertoRico,ex1) wrote:
>Is there a way to create a button to abort an evaluation?
>The problem is that I have created an application that runs continuously in
>a manufacturing line.  I want to provide operators an easy way to stop and
>star the program.
>
>Ariel Sepulveda
>(787)819-6057

Ofcourse you can use the menu item (Kernel>Abort Evaluation) or its key 
command.

To put it into a button, you need to know a little frontend programming. 
Most menu items are creatures called FrontEndTokens, which you can put in a 
button.

NotebookPut[
   Notebook[
     {Cell[BoxData[
           ButtonBox["Abort", Active -> True,
             ButtonFunction :>
               FrontEndExecute[{FrontEndToken["EvaluatorAbort"]}]
             ]]]},
     WindowSize -> {Fit, Fit}
     ]]

--------------------------------------------------------------
Omega Consulting
"The final answer to your Mathematica needs"
http://omegaconsultinggroup.com


  • Prev by Date: Re: Mathematica shows wrong numbers
  • Next by Date: Re: ricatti & set of ODE solution.
  • Previous by thread: Re: Aborting an evaluation with a button
  • Next by thread: fyi: numerical differentiation