• 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: How to properly print a SEL type variable?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to properly print a SEL type variable?


  • Subject: Re: How to properly print a SEL type variable?
  • From: "Stephen J. Butler" <email@hidden>
  • Date: Wed, 7 Jul 2010 00:13:32 -0500

On Wed, Jul 7, 2010 at 12:07 AM, vincent habchi <email@hidden> wrote:
> Hi there,
> this is a very simple question, but I don't seem to find the answer anywhere.
>
> What is the proper format to use in NSLog to print out a SEL type variable? E.g.
>
> SEL aSelector = @selector (foo);
> NSLog ("%<What shall I put here?>", foo);
>
> If I use %s, it works, but I get a warning because the variable is not of the char* type.

Also, I forgot about sel_getName() in <objc/runtime.h>. That returns a
const char *.
_______________________________________________

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

References: 
 >How to properly print a SEL type variable? (From: vincent habchi <email@hidden>)

  • Prev by Date: Re: How to properly print a SEL type variable?
  • Next by Date: Re: How to properly print a SEL type variable?
  • Previous by thread: Re: How to properly print a SEL type variable?
  • Next by thread: Scrolling not working ...
  • Index(es):
    • Date
    • Thread