FSMountServerVolumeSync Authentication problem
FSMountServerVolumeSync Authentication problem
- Subject: FSMountServerVolumeSync Authentication problem
- From: Kevin Bracey <email@hidden>
- Date: Wed, 28 Oct 2009 11:47:38 +1300
I found using Applescript far easier for this task.
In Cocoa wait for the mount [[[NSWorkspace sharedWorkspace]
notificationCenter] addObserver:self
selector:@selector(deviceDidMount:)
name:NSWorkspaceDidMountNotification
object:NULL];
Call the script
set holdMountPoint to @"afp://@10.0.1.251/SetupScripts"
tell application "Finder"
mount volume holdMountPoint
end tell
There's a little gotta in checking the correct mount point, I found
rangeOfString: is they way to go.
-( void )deviceDidMount:( NSNotification *)userInfo
{
NSString *devicePath = [[userInfo userInfo]
objectForKey:@"NSDevicePath"];
if( [devicePath rangeOfString:@"SetupScripts"].location != NSNotFound )
{
[self loadCustomerScriptsPopup];
}
}
cheers
Kevin
_______________________________________________
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