• 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: NSURL question (easy (i think))
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURL question (easy (i think))


  • Subject: Re: NSURL question (easy (i think))
  • From: Hasan Diwan <email@hidden>
  • Date: Wed, 29 May 2002 19:02:09 -0400

There's probably an approved way to do this, but I always use the following:
NSString *myURLString=[MyTextView string];
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:[NSString stringWithString:myURLString]];
On Wednesday, May 29, 2002, at 06:23 PM, Mamdouh wrote:

Hi all

I have newbie question about URL handling:

I4m trieng to take the string of a NSTextView and make it into an NSURL, and heres what i4m doing:

NSString *MyUrlString= [MyTextView string];
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.%@.com",MyUrlString]];

You can probably guess that i4m trying to replace the %@ with the MyUrlString, but i4m making somekind of typo here, or using a wrong method, but i cant find out what...

I would apriciate if somebody could correct me here!

TIA
Mamdouh
Student/Programmer
Denmark
_______________________________________________
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.

Hasan Diwan
OpenPGP KeyID: 0xBE42DCA6
Fingerprint: 1CB0 47E3 0A24 DAC1 DCCA 4225 F166 40C2 BE42 DCA6
http://hasandiwan.net/~hdiwan/gpg.key
_______________________________________________
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: 
 >NSURL question (easy (i think)) (From: Mamdouh <email@hidden>)

  • Prev by Date: Re: Scoping of functions
  • Next by Date: Re: Scoping of functions
  • Previous by thread: NSURL question (easy (i think))
  • Next by thread: Re: NSURL question (easy (i think))
  • Index(es):
    • Date
    • Thread