Re: [Gambas-user] subtyping (coercing) heirarchical objects

2012-10-16 Thread Benoît Minisini
Le 16/10/2012 12:44, Bruce a écrit : > Given a collection "c" of objects of type "x" and an inheritance > hierarchy where "x1" and "x2" are subtypes of "x", is there an easy way > to cast c[id] to the proper subtype ( i.e ":x1" or ":x2") when some > occurrence allows a logical discernment between t

[Gambas-user] subtyping (coercing) heirarchical objects

2012-10-16 Thread Bruce
Given a collection "c" of objects of type "x" and an inheritance hierarchy where "x1" and "x2" are subtypes of "x", is there an easy way to cast c[id] to the proper subtype ( i.e ":x1" or ":x2") when some occurrence allows a logical discernment between the subtypes? Bruce --