Re: Is the sender of an obj-c method implied in the destination's method?
Re: Is the sender of an obj-c method implied in the destination's method?
- Subject: Re: Is the sender of an obj-c method implied in the destination's method?
- From: John Stiles <email@hidden>
- Date: Mon, 10 Dec 2007 21:24:46 -0800
Just out of curiosity, why is stack unwinding considered
inconsistent? It has to work well enough for zero-cost exception
handling to function, in the "new" frameworks at least...
On Dec 10, 2007, at 9:06 PM, Bill Bumgarner wrote:
On Dec 10, 2007, at 8:51 PM, Philip Dow wrote:
So my method just got called, [anObject called]. I'm wondering,
does an implied reference exist to the caller from inside called,
like self and _cmd? I'm looking at NSInvocation, but it doesn't
look like there's an +[NSInvocation currentInvocation] type method.
Is there a way to get this information without explicitly passing
the caller in as a parameter? Would be cool.
It isn't explicitly available, nor can you consistently unwind the
stack to figure it out. Nor is there even a guarantee that the
"sender" is really some Objective-C object; it could just as
easily be a function or FFI produced closure, in the case of the
various language bridges.
b.bum
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
40blizzard.com
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden