Re: How to mount an iDisk? (easy solution)
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.