[scilab-Users] wired problem of the edit tab

Peng Du eddy.pdu at gmail.com
Tue Sep 28 00:27:48 CEST 2010


Hi Mathieu

Great to know that. I do have some experience with OOP languages but wasn't
aware of these features of scilab.

Thanks very much for your help.

Best,

Peng

On 27 September 2010 21:22, Mathieu Dubois <mathieu.dubois at limsi.fr> wrote:

> Hello,
>
> Le 27/09/2010 17:42, Peng Du a écrit :
>
>  Many thanks Mathieu, you are so right - it works after I delete some
>> variable assignments. But why did they cause the problem?
>>
>>  I guess you have unconsciously redefined a scilab variable...
>
> For instance if you define a variable called length the you can no longer
> use the length function. For instance:
> x=-10:0.1:10;
> length=0;
> length(x); // Error length is now a vector
>
> If you execute the code above scilab will print a warning on line 2. You
> can turn this into an error: see help funcprot. This kind of error is common
> in dynamic languages (I remember I had the same issue in Python).
>
> In your case the problem seems to be related with function or operators
> overloading (see help overloading). This one of the most powerful
> functionality of scilab so you may take time to read about it (it took me
> several times to understand). If you are familiar with language that allow
> this (which most object-oriented languages C++, Python, etc. Java excepted)
> this should sound familiar. You may have a look at the tutorial by Eike
> Rietsch at http://www.scilab.org/support/documentation/community (see
> section 6).
>
> I guess you have defined a variable or a function called "handle" (or whose
> name contains "_h") so when scilab was trying to insert something your
> handle "p" it called your function and an error happened...
>
> By the way the error message you first posted was also about operators (it
> complains about function %h_e which is used to extract information form a
> handle). So maybe your first problem also vanished...
>
> HTH,
> Mathieu
>
>  On 27 September 2010 16:21, Mathieu Dubois <mathieu.dubois at limsi.fr
>> <mailto:mathieu.dubois at limsi.fr>> wrote:
>>
>>    On 09/27/2010 04:51 PM, Peng Du wrote:
>>
>>>    Hi. I tried set the figure properties via commands. But similar
>>>    error messages are reported:
>>>
>>>    I added
>>>
>>>    p=gcf();
>>>    p.figure_name="foo";
>>>
>>>    Which are excerpt from the example of online documents. And the
>>>    console says:
>>>
>>>    error 21
>>>    invalid index
>>>    at line 4 of function generic_i_h called by:
>>>    line 2 of function %c_i_h called by:
>>>    p.figure_name="foo";
>>>
>>    Very stange... Looks like an overloading issue... Did you clear all
>>    your variables?
>>
>>
>>>    Best regards,
>>>
>>>    Peng
>>>
>>>    On 27 September 2010 15:15, Peng Du <eddy.pdu at gmail.com
>>>    <mailto:eddy.pdu at gmail.com>> wrote:
>>>
>>>        Oh dear... scilab suddenly fixed itself, after I did
>>>        absolutely nothing..
>>>
>>>        It is nice to have it working, however my fear is it will come
>>>        back anytime without a notice..
>>>
>>>        Thanks very much Mathieu, I will update this thread if
>>>        anything happens again.
>>>
>>>        Regards,
>>>
>>>        Peng
>>>
>>>
>>>        On 27 September 2010 14:44, Mathieu Dubois
>>>        <mathieu.dubois at limsi.fr <mailto:mathieu.dubois at limsi.fr>> wrote:
>>>
>>>            On 09/27/2010 03:20 PM, Peng Du wrote:
>>>
>>>>            Hi Mathieu,
>>>>
>>>>            I can see the menu after clicking "Edit", however,
>>>>            nothing shows up except for those error messages when
>>>>            selecting either "figure properties" or "Axes
>>>>            properties". I also tried using "entity picker", but
>>>>            still, it reports errors when I pick anything on the graph.
>>>>
>>>            Sad... which version are you using? You can try the
>>>            classical tip: update your drivers. If the problem
>>>            persists you should fill a bug report...
>>>
>>>            On the bright side if you need to change graphical
>>>            properties (changing colours, line style, and so on), you
>>>            can do everything with commands. If you are not familiar
>>>            with the graphical API you might look at "help
>>>            graphical_entities". It is a bit hard but it allows to do
>>>            very nice plots. There are lots of help messages in the
>>>            archive, too.
>>>
>>>            If you have a specific request, don't hesitate...
>>>
>>>            Good luck.
>>>
>>>
>>>>            Thanks.
>>>>
>>>>            Peng
>>>>
>>>>            On 27 September 2010 14:10, Mathieu Dubois
>>>>            <mathieu.dubois at limsi.fr
>>>>            <mailto:mathieu.dubois at limsi.fr>> wrote:
>>>>
>>>>                Hello,
>>>>
>>>>
>>>>                On 09/25/2010 01:54 AM, Peng Du wrote:
>>>>
>>>>                    Hi.
>>>>
>>>>                    When I click the "edit" tab of the graphic
>>>>                    window, no new window shows up. Instead the
>>>>                    console reports:
>>>>
>>>>                "Edit" normally shows a menu... Do you see the menu
>>>>                or not?
>>>>
>>>>
>>>>                    !--error 21
>>>>                    invalid index
>>>>                    at line 3 of function %h_e called by:
>>>>                    line 6 of function getparfig called by:
>>>>                    line 21 of function TK_send_handles_list called by:
>>>>                    line 40 of function ged called by:
>>>>                    ged(4,0)
>>>>                    while executing a callback
>>>>
>>>>                    Does anyone know why this is happening and how to
>>>>                    fix it? Thanks a lot.
>>>>
>>>>                I remember I had a problem under some old version of
>>>>                scilab (like 5.1.1) when cliking on "Figure
>>>>                properties"... The workaround was to click on "Axes
>>>>                properties".
>>>>
>>>>                By the way under scilab 5.3 beta 3 clicking on
>>>>                "Edit->Figure properties" seems to hang scilab... I
>>>>                have attached the bug report...
>>>>
>>>>                Mathieu
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20100927/cb2df2f3/attachment.htm>


More information about the users mailing list