Mount volume behaviour in Leopard

Hey everyone…

I’ve got an annoying “problem” with the mount volume command in Leopard.

Basically my app tells either System Events or Finder to ‘mount volume “smb://server/share”’ which works fine, however I have this in a try block to catch and display any errors nicely.

Since upgrading to leopard if, say, the server is unavailable, or the share name is incorrect, or whatever triggers and error, Finder or System Events display their own error first, then my app shows the error it catches from the try block.

Basically this gives me two error messages, and I can’t seem to suppress the one that Finder gives me - I don’t want the vague one it gives, I want to handle the error myself and display it properly.

Hope I’ve explained the problem there, and look forward to any help you may be able to give.

Thanks

Hi Ryan,

mount volume is a command from Standard additions,
there is no need to use a Finder or System Events tell block

Oh right, in Tiger I could have sworn that I needed to either tell Finder, or System Events if I wanted it not to freeze up Finder.

Anyway I took out the try blocks and tried it again, and still get an error dialog popup from ‘Standard Additions’ or whatever, as well as getting an error code and message returned which my app handles.

It didn’t used to do that on Tiger :frowning:

Anyone else got any idea how I can work around this at all?

Maybe a way to mount the shares and suppress errors from the system, so that only my app handles the errors?

Would it be possible to do this using Objective-C and then maybe call method from the main AppleScript Studio app?