Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Disabling a button during the computation??

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15037] Disabling a button during the computation??
  • From: Ville T Oikarinen <oikarine at cc.helsinki.fi>
  • Date: Wed, 9 Dec 1998 04:12:22 -0500
  • Organization: University of Helsinki
  • Sender: owner-wri-mathgroup at wolfram.com

Hello, fellow-Mathematicans!

I have programmed a user interface with Mathematica. My problem is that
if the user clicks the button repeatedly, the kernel is called many
times for evaluation. The button function makes some changes in global
data so data integrity problems arise. In fact, either the program or
the whole Mathematica crashes.

I don't think disabling the button in the beginning of the button
function will be sufficient, because the user may click the button even
faster than Mathematica evaluates the beginning of the function.

So is it possible either to disable multiple kernel calls, i.e.
synchronize the front end and the kernel, or synchronize the button
function with itself so that the later calls of the button function
know that they are "too late?" 

Please, anyone know?

Ville Oikarinen

P.S. The program is a learning program for students so I can't expect
the users to be patient and only click once:-)



  • Prev by Date: MathLink: DLLMAIN error:linking with Borland C++ Builder 3
  • Next by Date: Re: RE: New Notebook looses focus after first keystroke
  • Previous by thread: MathLink: DLLMAIN error:linking with Borland C++ Builder 3
  • Next by thread: RE: Disabling a button during the computation??