• 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: "current" selector as string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "current" selector as string


  • Subject: Re: "current" selector as string
  • From: Fritz Anderson <email@hidden>
  • Date: Thu, 24 Jul 2003 10:10:13 -0500

To supplement the other answers (_cmd is the right way to communicate with the runtime), GCC provides __FUNCTION__ and __PRETTY_FUNCTION__ as counterparts to __LINE__ and __FILE__. They're C strings suitable for debugging, and __PRETTY_FUNCTION__ shows Objective-C methods as +/-[Classname method:name:].

-- F

On Thursday, 24 July 2003, at 5:28 AM, Michael Monscheuer wrote:

What I do:
I'm working on an error tracker.

My Question is:
how to find out the SEL of the current method during runtime.

Some description:
It is no problem to find out the current line and file (by preprocessors' __LINE__ and __FILE__) and the current class (by NSStringFromClass([self class]).
But now I want to find out the name of the method the error occured in
by using its SEL. So what I'd need is some kind of function to find out the current SEL....
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >"current" selector as string (From: Michael Monscheuer <email@hidden>)

  • Prev by Date: Re: NSAppleScript question
  • Next by Date: Re: NSAppleScript question
  • Previous by thread: Re: "current" selector as string
  • Next by thread: NSAppleScript question
  • Index(es):
    • Date
    • Thread