• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is the sender of an obj-c method implied in the destination's method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Is the sender of an obj-c method implied in the destination's method?
      • From: Alastair Houghton <email@hidden>
References: 
 >Is the sender of an obj-c method implied in the destination's method? (From: Philip Dow <email@hidden>)
 >Re: Is the sender of an obj-c method implied in the destination's method? (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: Is the sender of an obj-c method implied in the destination's method?
  • Next by Date: Suppressing GC capability mismatch error messages
  • Previous by thread: Re: Is the sender of an obj-c method implied in the destination's method?
  • Next by thread: Re: Is the sender of an obj-c method implied in the destination's method?
  • Index(es):
    • Date
    • Thread