On Oct 8, 2009, at 1:05 AM, Kevin Bracey wrote:

Hi Guys and Gals,

I have some Leopard code that works fine, but on Snow it doesn't, hoping someone might have an idea how for fix it ;-)

I use an AppleScript to mount a afp
tell application "iLike Installer"
        
        set holdMountPoint to stringForKey "MountPoint"
        
        tell application "Finder"
                mount volume holdMountPoint
        end tell
        
end tell

This works great, the sharepoint mounts as expected on both OS X 5.8 and OS X 6.1 :)

Now I have a Cocoa App listening for the share to mount with

[[[NSWorkspace sharedWorkspace] notificationCenter]  addObserver:self
                                                                        
selector:@selector(deviceDidMount:)
                                                                        
name:NSWorkspaceDidMountNotification
                                                                        
object:NULL];

shortly are the point mounts on Leopard the -( void )deviceDidMount: ( NSNotification *)userInfo fires as expected and it goes about it's business,

but on Snow it never fires:(

anyone got any ideas as to what I could be doing wrong or another way to listen for an afp to mount?

Hi Kevin,

I wasn't able to reproduce this problem. You might verify the following:

- The app is not hung at the point you expect to receive the notification - The observer is retained, or if you are using GC, something is referencing it. NSNotificationCenter does not root observers in either retain-release or GC.

It would also be interesting to know if the app receives the notification when you mount the volume manually with the Finder.

If none of that helps, and you can either distribute your app or produce a test case, please file a bug. If I discover it's a problem in Workspace, I'll suggest a workaround. Or if it's a problem in your app I'll share that information too of course :)

-Peter


_______________________________________________

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