• 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: Re: URLWithString fails to fails with bad string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: URLWithString fails to fails with bad string


  • Subject: Re: Re: URLWithString fails to fails with bad string
  • From: email@hidden
  • Date: Wed, 25 Nov 2009 16:59:34 +0000

On Nov 25, 2009 10:36am, Jens Alfke <email@hidden> wrote:


On Nov 25, 2009, at 8:31 AM, email@hidden wrote:



> So is there a way to validate a string before passing it to URLWithString?



Depends on what you want to do. If you want URLs of a specific scheme, check the -scheme property of the resulting NSURL. That will weed out degenerate cases like "foo".



—Jens
Thanks for the reply. I'm looking through the Cocoa API now. I think I might be able to use NSNetService's -resolveWithTimeout along with NSURL's -scheme to validate a string. Seems like more work than should be necessary, but oh well.
Thanks all.
_______________________________________________

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

  • Follow-Ups:
    • Re: URLWithString fails to fails with bad string
      • From: Jens Alfke <email@hidden>
References: 
 >Re: URLWithString fails to fails with bad string (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: NSOutlineView - How to hide disclosure triangle for root nodes ?
  • Next by Date: Re: NSOutlineView - How to hide disclosure triangle for root nodes ?
  • Previous by thread: Re: URLWithString fails to fails with bad string
  • Next by thread: Re: URLWithString fails to fails with bad string
  • Index(es):
    • Date
    • Thread