I'd like to have a method determine the name of the method that invoked it -- as an NSString.

For example

- (void) method1 {
        [someObject method2];
}

- (void) method2 {
        // here, I'd like to be able to find the name of the caller
        // in this example, that would be "method1"
}

I have a suspicion that this is either trivial, and I'm just missing the obvious, or its far from trivial and requires accessing the stack and some symbol table.

Any pointers (no pun intended) as to where I can find more information to understand the internal mechanisms would be appreciated.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to