[scilab-Users] Re: addmenu
Samuel GOUGEON
Samuel.Gougeon at univ-lemans.fr
Wed Oct 20 17:21:32 CEST 2010
----- Message d'origine -----
De : Jens Simon
Date : 20/10/2010 15:21:
> I expected - as the button interrupts the loop - that "break" is inserted into
> it to end it. What would you do to acchieve that?
OK, you might use the following:
idM = uimenu("parent",0,"label","END","callback","escapeLoop=%t;");
escapeLoop=%f;
lines(2000);
for i=1:1000, disp(i), sleep(100), if escapeLoop, break, end, end
Or if you want to abort the running code to go back to level 0,
instead of just escaping the running loop, you might use
... "callback","abort"
However, this is already available through the Control menu of the console.
Have nice tests
Regards
Samuel
More information about the users
mailing list