[Scilab-users] clc() icon with additional functionality !!?

Samuel Gougeon sgougeon at free.fr
Sun Feb 2 14:18:06 CET 2014


Le 02/02/2014 10:05, A Khorshidi a écrit :
>     <button icon="edit-clear" tooltiptext="Clear All">
>
>         <callback   instruction="    clc();
>                     clear();
>                     clearglobal();
>                     resethistory();
>                     chdir()"
>                     type="0"/>
>
>     </button>
>
> After restarting Scilab, the new clc icon must can do all the above 
> tasks but it cannot clear local and global variables!
> Actually, I think, the "instruction" attribute cannot perform some 
> scilab commands sush as : clear(), clearglobal(),..
> However there are many instructions which work fine: clc(), 
> resethistory(), chdir(),..
>
> So where is the problem?
My best guess would be that in the callback, you should drop the atomic 
bombs clear() (and may be clearglobal()
if the callback instruction has survived to the clear() that it 
performed) as /last/ instructions. clear() also clears the /gcbo/ variable:
So your proposal looks like a gcbo-callback  suicide. And it is somewhat 
preferable to kiss one's mother /before/ suiciding oneself than /after/.

AAaaa /clear all, close all/... Nice custom!
:-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20140202/4ce2c3b1/attachment.htm>


More information about the users mailing list