Re: Message dialog on Cocoa
Re: Message dialog on Cocoa
- Subject: Re: Message dialog on Cocoa
- From: "Felipe Monteiro de Carvalho" <email@hidden>
- Date: Fri, 20 Jul 2007 11:48:26 +0200
On 7/20/07, ∞ <email@hidden> wrote:
creating a NSString to pass to NSRunAlertPanel
You can create a NSString literal easily in .m files by using @"This is a
NSString literal". You can also use CFStringRef's by casting them to
(NSString*) thanks to Apple's toll-free bridging (which makes many CFxxx
types exactly the same as Cocoa NSxxx types).
Nice!
But are they really identical or some operation is performed on the type-cast?
I tryed to create some CFStringRef's and give them to NSRunAlertPanel,
but I receive many error messages:
2007-07-20 11:41:27.568 cocoamsg[433] *** _NSAutoreleaseNoPool():
Object 0x306bc0 of class NSCFString autoreleased with no pool in place
- just leaking
Not to mention that the dialog doesn't show.
Strangely NSRunAlertPanel returns 0, which should be no error.
thanks,
--
Felipe Monteiro de Carvalho
_______________________________________________
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