Introspection

1 view
Skip to first unread message

SirG3

unread,
Jan 25, 2006, 10:47:20 AM1/25/06
to REALs...@googlegroups.com
Here's a small class to do introspection with -- mostly just stuff
Thomas figured out, but oh well.

-- SirG3

introspection.rbp

Thomas Tempelmann

unread,
Jan 25, 2006, 12:14:54 PM1/25/06
to REALs...@googlegroups.com
Great.

Now, who can think of something useful to do with it :)

Oh, and how about adding this as a downloadable link to the wiki page?

Asher Dunn

unread,
Jan 25, 2006, 3:23:02 PM1/25/06
to REALs...@googlegroups.com

On Jan 25, 2006, at 12:14 PM, Thomas Tempelmann wrote:

>
> Great.
>
> Now, who can think of something useful to do with it :)

Well, if you can figure out a way to create an object from a class
name, then you can serialize arbitrary objects ;-)

Asher

-------------------------
Asher Dunn
Head Developer, Fireye Software
http://www.fireyesoftware.com/
AIM, Yahoo, MSN: crazedglkid

Thomas Tempelmann

unread,
Jan 25, 2006, 4:21:22 PM1/25/06
to REALs...@googlegroups.com
On 1/25/06, Asher Dunn <iridesc...@gmail.com> wrote:
>
> Well, if you can figure out a way to create an object from a class
> name, then you can serialize arbitrary objects ;-)

I like to point out that, like SirG3 showed with the "Address" function trick,
it's quite possible to locate internal RB functions and call them.

So, it might be possible to call those functions that officially only the
Plugin API has access to, for instance, and that includes lookup functions
for methods of classes as well as ways to instantiate new classes.

All that's missing is a way to access their properties. So, if someone finds
out how to access the property values, we could get quite far, I gues...

And, and someone's already updating the wiki, I can tell :))

One more thought: Would be nice if we could figure out RB's internal
object memory management. There must be a linked list or a table
(hopefully the further) that links to all objects in existence. With that,
we could inspect ALL objects of an app and store them into a file
for debugging, like a post mortem dump.

TT

SirG3

unread,
Jan 25, 2006, 4:48:42 PM1/25/06
to REALs...@googlegroups.com
Yes, plugin SDK calls are very doable with this. It's actually how
Aaron Ballman gets the right graphics handle for his WFS. Also, it's
possible to call protected / private functions of other classes, just
beware of the implicit self!

--SirG3

Reply all
Reply to author
Forward
0 new messages