Introspection v3

3 views
Skip to first unread message

SirG3

unread,
Feb 9, 2006, 10:24:16 PM2/9/06
to REALs...@googlegroups.com
Here's my third stab at. This works *much* better. In case you don't
feel like downloading it, here's my code to show it off:
dim o as new ObjectInstance( self )
dim w as Window = o.superclass.createInstance()

break

dim supers() as string
dim tmp as ObjectClass = o.superclass

while not ( tmp is nil )
supers.append( tmp.name )

tmp = tmp.superclass
wend

system.debugLog( join( supers, " <- " ) )

for each m as ObjectMethod in o.methods
system.debugLog( m.name )
next

for each e as ObjectMethod in o.events
dim implemented as string = "False"

if e.functionPtr > 0 then _
implemented = "True"

system.debugLog( e.name + " -> " + implemented )
next

for each p as ObjectProperty in o.properties
system.debugLog( p.name + " -> " + p.value )
next

Cloning of objects almost works, but some bugs I have to sort out...

-- SirG3

introspection.rbp
Reply all
Reply to author
Forward
0 new messages