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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to