• 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: Notify With Parameters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notify With Parameters


  • Subject: Re: Notify With Parameters
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 02 Jun 2011 00:36:10 -0700

On Jun 2, 2011, at 12:32 AM, I wrote:

>>       // The following code cannot be compiled.
>>       // NSString *message = "Happy holidays!";
>>       // [[NSNotificationCenter defaultCenter] postNotificationName:@"Done"
>> object:message];
>
> Why can’t it be compiled? I don’t see any errors in there.

…except I just noticed that your string constant is a C string not an NSString. It should be
	NSString *message = @"Happy holidays!”;

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: 
 >Notify With Parameters (From: Bing Li <email@hidden>)
 >Re: Notify With Parameters (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Notify With Parameters
  • Next by Date: Re: Declaring and initialization of C array.
  • Previous by thread: Re: Notify With Parameters
  • Next by thread: Re: Code style (was: Notify With Parameters)
  • Index(es):
    • Date
    • Thread