[prev in list] [next in list] [prev in thread] [next in thread]
List: scilab-dev
Subject: [Scilab-Dev] Execute callback in main_menubar.xml
From: Samuel Gougeon <sgougeon () free ! fr>
Date: 2013-02-24 19:49:41
Message-ID: 512A6ED5.7000108 () free ! fr
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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
[Attachment #5 (text/html)]
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Arial">Hello,<br>
<br>
The "File =>Execute" command from the console is defined in <br>
SCI\modules\gui\etc\main_menubar.xml<br>
Instead of running an exec(file) command, i would like to take<br>
mode() into account, and run exec(file, mode()) instead.<br>
<br>
Then, puzzingly, mode() is always equal to -1:<br>
Line#9, set <br>
...then \
disp(mode()); exec(%fileToExec); ...<br> and rerun a fresh scilab \
session, and load a file to execute.<br> <br>
Yet, if now we set the mode through a variable -- say m -- that
can be<br>
set in the console, the variable is well seen:<br>
<br>
</font><font face="Arial">Line#9, set <br>
...then \
disp(m); exec(%fileToExec, m); ...<br> and rerun a fresh scilab \
session:<br> Then type <br>
--> m=1; // Then load a file to execute through the File =>
Execute menu<br>
// => It is OK!<br>
<br>
Why is mode() reset to -1 in the main_menubar, while other
variables are not?<br>
<br>
Samuel<br>
<br>
</font>
</body>
</html>
_______________________________________________
dev mailing list
dev@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic