Le 11/05/2015 16:26, Piotr Grudzinski a écrit :
> Hello all,
>
> There is a file attached to this email to demonstrates the problem.
>
> The callback of the second button calls test_linspace() and there is no
> problem.
>
> The callback of the first button calls rb_selected() which then calls
> test_linspace() and the following error is generated:
>
>
> button 1
> !--error 21
> Invalid index.
> at line 22 of function linspace called by :
> at line 2 of function test_linspace called by :
> at line 7 of function rb_selected called by :
> allbackobject(225);rb_selected(1);if exists("%oldgcbo") then gcbo
> while executing a callback
>
> Am I doing something wrong?
Your problem is due to the type function redefinition
the rb_selected function should be written as follow
function rb_selected(typ)
if (typ == 1) then
disp('button 1');
else
disp('button 2');
end
test_linspace();
endfunction
>
> Regards,
> Piotr
>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users