this question is mostly for the folks at rb, but i'd
appreciate anyone's input. i was under the impression rb's
Address Of call only worked with module methods, but i just d/
led code from someone who uses it with a class method. is
this allowed now? is it officially supported, or is this a
case of lucky accident i shouldn't use?
I believe it's not unsupported.
That's a good way to put it.
It's not an accident that you can get the address of an instance
method. I'm not sure that there's anything useful you can do
with such an address, but if you can think of something, well,
have at it.
I think he's talking about shared methods, with which one can do
something useful.
no i'm speaking of instance methods... what i end up doing a lot
is having many status callbacks from declares which all get sent
to a module currently, and it messages the appropriate class
instance, with this i should be able to setup the callback to
directly call the proper instance.
or think a carbon timer class, that registers the callback to call
itself back so i can have something akin to an action event,
rather than having one carbon timer module... much cleaner.
Then you should sign on to requests for weak references, which
would make this easier to implement.
well, this seems to kinda work as is... except for the parts that
don't work at all :) my early tests with simple things like beep
seemed fine, but now that im doing stuff that relies on instance
properties in the callback - it appears i'm not really in the
instance at callback time?? all my properties are nil, even though i
just made sure they were set.
it appears that the callback is calling the instance method as if it
were a shared method? this is all starting to make some sense. i
think this is where a class on low level oop implementation would
have helped me. do all class instances share the same function ptr?
then some magic is done to ref the right properties at call time?
mike
--
Mike Woodworth
[EMAIL PROTECTED]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>