Re: Showing a URL with spaces in a NSAlertPanel
Re: Showing a URL with spaces in a NSAlertPanel
- Subject: Re: Showing a URL with spaces in a NSAlertPanel
- From: Nick Zitzmann <email@hidden>
- Date: Wed, 21 Jan 2004 18:25:43 -0800
On Jan 21, 2004, at 6:05 AM, Shoaib wrote:
I want to show a URL that contains a space (shown below, escaped with
) in an NSAlertPanel but is shows up garbled.
http://www.mysite.com/Hello World.html
Any ideas?
The second argument of NSRunAlertPanel() takes a formatted string, so
if you're just displaying that URL in the panel, you must do something
like this:
NSRunAlertPanel(@"The URL is:", @"%@", @"OK", nil, nil, someURL);
Otherwise, the varargs functions NSRunAlertPanel() calls will treat
that % as meaning an argument should be pasted in that spot...
Nick Zitzmann
<
http://seiryu.home.comcast.net/>
<
http://www.freshlysqueezedsoftware.com/>
S/MIME signature available upon request
UNIX: Where /sbin/init is Job #1.
_______________________________________________
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.