• 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: [Newbie] Ampersands in NSURL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Newbie] Ampersands in NSURL


  • Subject: Re: [Newbie] Ampersands in NSURL
  • From: Joseph Feld <email@hidden>
  • Date: Sun, 22 Sep 2002 09:53:43 -0400

Thanks, Jeremy! OK, this was too weird. It works for me too if I put my
stringWithFormat in the URLWithString method, but it didn't if I constructed
an NSString beforehand and passed that to URLWithString??? Is this an
encoding conflict perhaps? Anyhow, thanks again.

Joe

on 9/22/02 8:25 AM, Jeremy Dronfield at email@hidden wrote:

> Difficult to answer, since you don't specify what headers you want. You
> can add a Cc, subject and some message text like so:
>
> NSURL *url=[NSURL
> URLWithString:@"mailto:email@hidden?cc=email@hidden&subject=
> My Subject Text&body=Message text"];
> [[NSWorkspace sharedWorkspace] openURL:url];
>
> ... which gives the following headers:
>
>> To: email@hidden
>> Cc: email@hidden
>> Subject: My Subject Text
>>
>> Message text
>
> If all you want is to get ampersands into your headers, & works just
> fine OMM, like so:
>
> NSURL *url=[NSURL
> URLWithString:@"mailto:email@hidden?cc=email@hidden&subject=
> My Subject & Subject2Text&body=Message text"];
> [[NSWorkspace sharedWorkspace] openURL:url];
>
> ... which produces headers:
>
>> To: email@hidden
>> Cc: email@hidden
>> Subject: My Subject & Subject2Text
>>
>> Message text
>
> -Jeremy

--
Joseph Feld
email@hidden

"You have the right to bear arms and the right to arm bears...whatever the
hell you wanna do."--Robin Williams
_______________________________________________
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: 
 >Re: [Newbie] Ampersands in NSURL (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: Re: sheet comes unglued from its window
  • Next by Date: Re: iTunes feature: OT
  • Previous by thread: Re: [Newbie] Ampersands in NSURL
  • Next by thread: Pointer to static object member
  • Index(es):
    • Date
    • Thread