Via Introspection Copy Class to Class ??

I have a window (pw) that has a super BWindowClas, and that BWindowClas has the property which is a class whose name “DspRow”
How can I easily copy that DspRow to the calling window’s complement?
Can I copy that via introspection?

The code below is wrong as

L_dar = pw.DspRow

as type window (pw) doesn’t have as a member DspRow.

L_dar is the complement where it needs to go.

Dim ti1 as Introspection.Typeinfo = Introspection.GetType(pw) ''Dim pi1 As Introspection.Typeinfo = Introspection.GetType(BWindowClas) If ti1.BaseType.FullName = "BWindowClas" Then DadXr = 1 L_dar = pw.DspRow End If

dim mywindowclass as BWindowClass = BWindowClass (pw) if mywindowclass <> nil then ... end if
then mywindowclass has the property DspRow

http://developer.xojo.com/userguide/advanced-oop-features
see the “Casting” section.

Thanks. I am always getting confused when to do casting. Sometimes you do not get stuff from properties this easy.

Sorry, but that is not enough info.

Dim mywindowclass As Window = BWindowClass (pw) DadXr = 1 L_dar = mywindowclass.DspRow

I don’t know how to Dim mywindowclass
I also get an error on BWindowClass saying it doesn’t exist.

I also get an error DspRow isn’t (YET?) a property of type

mywindowclass must be dimensionned as BWindowClass, and not window as you typed.

Thanks. Someday I’ll have a handle on classes