[Scilab-Dev] Execute callback in main_menubar.xml

Samuel Gougeon sgougeon at free.fr
Sun Feb 24 20:49:41 CET 2013


Hello,

The "File =>Execute" command from the console is defined in
SCI\modules\gui\etc\main_menubar.xml
Instead of running an exec(file) command, i would like to take
mode() into account, and run exec(file, mode()) instead.

Then, puzzingly, mode() is always equal to -1:
Line#9, set
...then                 disp(mode()); exec(%fileToExec);   ...
and rerun a fresh scilab session, and load a file to execute.

Yet, if now we set the mode through a variable -- say m -- that can be
set in the console, the variable is well seen:

Line#9, set
...then                 disp(m); exec(%fileToExec, m);   ...
and rerun a fresh scilab session:
Then type
--> m=1;  // Then load a file to execute through the File => Execute menu
// => It is OK!

Why is mode() reset to -1 in the main_menubar, while other variables are 
not?

Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20130224/22ff19db/attachment.htm>


More information about the dev mailing list