[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 =&gt;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&nbsp; <br>
      ...then&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
disp(mode()); exec(%fileToExec);&nbsp;&nbsp; ...<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&nbsp; <br>
      ...then&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
disp(m); exec(%fileToExec, m);&nbsp;&nbsp; ...<br>  and rerun a fresh scilab \
session:<br>  Then type <br>
      --&gt; m=1;&nbsp; // Then load a file to execute through the File =&gt;
      Execute menu<br>
      // =&gt; 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