[Scilab-users] uicontrol in a function
    Dang, Christophe 
    Christophe.Dang at sidel.com
       
    Wed Jan  2 10:48:53 CET 2013
    
    
  
Hello,
I'm starting with my first graphical user interfaces.
It seems OK until I try to encapsulate it into a function.
Here is a minimal complete example:
// **********
function []=test(h)
    text = uicontrol(h, "style", "edit", ...
        "string", "foo",...
        "position", [50 100 100 20]);
    bouton = uicontrol(h, "string", "OK",...
        "position", [50 50 50 20], ...
        "callback", "text.string = string(0);");
endfunction
fig = figure(0);
test(fig);
// **********
When I run the script, nothing happens.
And if I first run execute the script without encapsulation
then the script with encapsulation (without clear() inbetween),
I get
  !--error 999 
set : The handle is no more valid.
at line       4 of function generic_i_h called by :  
at line       2 of function %c_i_h called by :  
bject(251);text.string = string(0);;if exists("%oldgcbo") then gcbo 
while executing a callback
So, I can I encapsulate?
-- 
Christophe Dang Ngoc Chan
Mechanical calculation engineer
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
    
    
More information about the users
mailing list