• 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: How to mount an iDisk? (easy solution)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to mount an iDisk? (easy solution)


  • Subject: Re: How to mount an iDisk? (easy solution)
  • From: email@hidden
  • Date: Mon, 25 Feb 2002 21:48:39 -0800

AppleEvents are your friend.

Send "afp://username:email@hidden/username/" as the direct
object to a GURLGURL appleEvent to the Finder and you're gold.

I haven't tried it myself, but if the above works, then:

NSString *originalString = "afp://username:email@hidden/username/";
NSString *correctedString = CFURLCreateStringByAddingPercentEscapes(NULL, originalString, NULL, NULL, kCFStringEncodingUTF8);
NSURL *urlToOpen = [NSURL URLWithString:correctedString];

[[NSWorkspace sharedWorkspace] openURL:urlToOpen];

should too. NSWorkspace is your friend. (NSURL wants to be your friend too, but it requires that you escape your illegal characters first. :->)

Ben Haller
Stick Software
_______________________________________________
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.

  • Prev by Date: Re: Document based application with that auto-new-doc behaviour
  • Next by Date: Re: complex problem 2
  • Previous by thread: Re: How to mount an iDisk? (easy solution)
  • Next by thread: complex problem 2
  • Index(es):
    • Date
    • Thread