user_data

classic Classic list List threaded Threaded
4 messages Options
Stefan Du Rietz Stefan Du Rietz
Reply | Threaded
Open this post in threaded view
|

user_data

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
sylvestre sylvestre
Reply | Threaded
Open this post in threaded view
|

Re: user_data

Le jeudi 20 octobre 2011 à 11:06 +0200, 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?
This is a Scilab mailing list. Not Scicoslab.
Please contact the scicoslab community.

Regards,
Sylvestre


Serge Steer-3 Serge Steer-3
Reply | Threaded
Open this post in threaded view
|

Re: user_data

In reply to this post by Stefan Du Rietz
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

Stefan Du Rietz Stefan Du Rietz
Reply | Threaded
Open this post in threaded view
|

Re: user_data

On 2011-10-20 16:04, Serge Steer wrote:
--------------------

> 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
>
Many thanks!

/Stefan