[scilab-Users] user_data

Serge Steer Serge.Steer at inria.fr
Thu Oct 20 16:04:04 CEST 2011


Le 20/10/2011 11:06, Stefan Du Rietz a écrit :
> In ScicosLab 4.4.1 (Win XP) I can set user_data in a graphics handle 
> to list but not mlist, tlist, or struct. Is that right, and if so, why?
>
> Regards
> Stefan
>
In Scicoslab and in Scilab it is possible to assign any object type into 
a user_data fiels using the set function

set(handle,"user_data",tlist("t",1,2,3))


If one want to be able to assign the user_data field using the dot 
notation like handle.user_data=tlist("t",1,2,3) he has to define the 
corresponding overloading function %t_i_h  (as reported in the error 
message). This can be done easily by

%t_i_h=generic_i_h;


For struct  the overloading function can be defined by 
%st_i_h=generic_i_h; and for cells by %ce_i_h=generic_i_h; Note that 
these two overloading function are already defined in Scilab.

Serge Steer
INRIA




More information about the users mailing list