[Scilab-users] Cannot understand scilex behavior when piping

Laurent Bonaventure laurent.bonaventure at ac-nantes.fr
Thu Oct 1 18:59:53 CEST 2015


Thank you for trying.

Anyway, I have a virtual linux somewhere, so I guess I could try it 
myself with Scilab 5.5.2. on linux; if the difference of behavior 
doesn't reproduce, that would narrow the search more.

See you,
Laurent

Le 01/10/2015 16:43, Antoine Monmayrant a écrit :
> Well,
>
> I am not sure I can test your stuff.
> When I manually feed scilab-adv-cli with your code, I get the following
> error when trying to open Edit/Axes Prop... :
>
>
> --> Undefined variable: TCL_EvalStr
>
> at line    44 of function ged (
> /home/myhome/softs/scilab-6.0.0-alpha-1/share/scilab/modules/graphics/macros/ged.sci
> line 52 )
>
> Is scilab-adv-cli really the equivalent?
> Or are all the non-cli things deactivated?
>
> Antoine
>
>
> Le 10/01/2015 04:36 PM, Laurent Bonaventure a écrit :
>> Hi Antoine.
>>
>> I guess that the corresponding command in Linux would be
>> "scilab-adv-cli".
>>
>> And yes, that would be very nice of you!
>>
>> Thanks for your interest in my predicament!
>>
>> Laurent
>>
>> Le 01/10/2015 16:26, Antoine Monmayrant a écrit :
>>> Hi,
>>>
>>> I'm not sure I'll be of any help, as I'm using Scilab on a linux
>>> machine.
>>> Is there an equivalent of scilex.exe on linux?
>>> (Is it scilab-adv-cli or scilab-cli?)
>>> If yes, I can try to run a test case under Linux using the corresponding
>>> equivalent to see if it's a problem with pipes or pipes on Windows.
>>>
>>> Antoine
>>>
>>> Le 10/01/2015 03:51 PM, Laurent Bonaventure a écrit :
>>>> Hello.
>>>>
>>>> I'm still trying to understand the difference in behavior when opening
>>>> a graphic windows, between:
>>>> - opening it directly from Scilex
>>>> - opening it from Scilex, but when Scilex stdin is piped
>>>>
>>>> I managed to narrow down the behavior to the opening of a new graphic
>>>> window by java.
>>>>
>>>> In Scilex (Windows 7+Scilab 5.5.2), if you type:
>>>>
>>>> jimport org.scilab.modules.graphic_objects.builder.Builder
>>>> jimport org.scilab.modules.graphic_objects.CallGraphicController
>>>> p=jinvoke(Builder,"createNewFigureWithAxes")
>>>> jinvoke(CallGraphicController,"setGraphicObjectProperty",p,357,%f)
>>>> //__GO_MENUBAR_VISIBLE__, false
>>>> jinvoke(CallGraphicController,"setGraphicObjectProperty",p,355,%f)
>>>> //__GO_TOOLBAR_VISIBLE__, false
>>>> jinvoke(CallGraphicController,"setGraphicObjectProperty",p,358,%f)
>>>> //__GO_INFOBAR_VISIBLE__, false
>>>> jinvoke(CallGraphicController,"setGraphicObjectProperty",p,357,%t)
>>>> //__GO_MENUBAR_VISIBLE__, true
>>>> jinvoke(CallGraphicController,"setGraphicObjectProperty",p,355,%t)
>>>> //__GO_TOOLBAR_VISIBLE__, true
>>>> jinvoke(CallGraphicController,"setGraphicObjectProperty",p,358,%t)
>>>> //__GO_INFOBAR_VISIBLE__, true
>>>>
>>>> then you get an empty graphic window (java), and when you select
>>>> Edit/Axes Properties, the Tk "graphic editor" window shows up
>>>> immediately.
>>>>
>>>> If you send the same commands to Scilex "through a pipe" (eg: cat |
>>>> scilex) (assuming you have "cat" on your windows), then the graphic
>>>> window appears normally, but the Tk window don't show up when you
>>>> select Edit/Axes Properties.
>>>>
>>>> Strangely, if you then close the graphic window and then reopen it (by
>>>> sending the above commands again), the Tk windows shows up (too late).
>>>>
>>>> Could someone give me a hint about what's going on here? Why isn't Tk
>>>> interacting correctly with the java graphic window in the "pipe" case,
>>>> while everything goes normally in the "non-pipe" case?
>>>>
>>>> Thanks
>>>>
>>>> Laurent Bonaventure
>>>>
>>>> Le 20/09/2015 04:41, Laurent Bonaventure a écrit :
>>>>> Hello.
>>>>>
>>>>> I'm still trying to pipe instructions into scilex (Windows 7, Scilab
>>>>> 5.4).
>>>>>
>>>>> When I send a plot command, scilex opens the graphics window and
>>>>> draw my
>>>>> polyline -> Great !
>>>>>
>>>>> Then I try to open the graphics editor from within the graphics window
>>>>> (e.g. Edit/Axes properties) : nothing happens.
>>>>>
>>>>> Then I close the graphics window.
>>>>>
>>>>> Then I send the plot command again. And poof! The graphics windows
>>>>> opens
>>>>> AND the long awaited graphics editor too. Except that nothing works
>>>>> in it.
>>>>>
>>>>> I guess it's some sort of handlers problem: the graphics window cannot
>>>>> communicate correctly with the scilab kernel and get the correct
>>>>> handlers to the figure.
>>>>>
>>>>> What's more strange, is that the behaviour is correct when I start
>>>>> scilex from within an interactive console (cmd)...
>>>>>
>>>>> Steps to reproduce (you need some utility like cat from gnuwin32,
>>>>> or any
>>>>> way to pipe commands to scilex) :
>>>>>
>>>>> (Incorrect behaviour, with a pipe)
>>>>> <from an interactive cmd.exe>
>>>>> cat | scilex
>>>>> x = 0:0.1:10
>>>>> plot(x,cos(x))
>>>>> <the graphic window opens>
>>>>> <click on Edit/Axes properties>
>>>>> <nothing happens>
>>>>> <close the graphic window>
>>>>> plot(x,cos(x))
>>>>> <the graphic window opens, and the graphic editor too (but it isn't
>>>>> functional)>
>>>>>
>>>>> (Correct behaviour, without pipe)
>>>>> <from an interactive cmd.exe>
>>>>> scilex
>>>>> x = 0:0.1:10
>>>>> plot(x,cos(x))
>>>>> <the graphic window opens>
>>>>> <click on Edit/Axes properties>
>>>>> <the graphic editor shows up immediately and is functional>
>>>>>
>>>>> I don't understand how scilex can see any difference between both
>>>>> approaches, and why it would have a different behaviour based on that
>>>>> difference. From its point of view, there shouldn't be any difference.
>>>>>
>>>>> Ah! And the -nw switch doesn't change anything... You get exactly the
>>>>> same behaviour in both cases.
>>>>>
>>>>> Can someone give me some sort of solution, or pointers, or even
>>>>> give me
>>>>> an idea for a workaround. I need to pipe things in scilex, and I need
>>>>> the first approach to work correctly...
>>>>>
>>>>> Thank you.
>>>>> Laurent
>>>>
>>>>
>>>> _______________________________________________
>>>> users mailing list
>>>> users at lists.scilab.org
>>>> http://lists.scilab.org/mailman/listinfo/users
>>>>
>>
>>
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>>
>
>





More information about the users mailing list