Re: Finding out that a volume is going away before it does
Re: Finding out that a volume is going away before it does
- Subject: Re: Finding out that a volume is going away before it does
- From: Ken Thomases <email@hidden>
- Date: Mon, 27 Oct 2008 10:40:20 -0500
On Oct 27, 2008, at 8:42 AM, Gregory Weston wrote:
On Oct 27, 2008, at 9:31 AM, Francis Devereux wrote:
On 26 Oct 2008, at 16:37, Gregory Weston wrote:
Amusingly, when you register an unmount or eject approval function
with DiskArbitration, that function gets invoked *after*
NSWorkspace sends its didUnmount notification. How's that for a
lead-in anecdote?
I think you're putting too much stock into this ordering. Think about
it: how do you think NSWorkspace arranges to learn about volume
unmounts in order to deliver the notification? It probably registers
a callback with DiskArbitration. If so, then the fact that it is
delivering its unmount notification before your callback gets called
is probably just due to the order in which the callbacks were
registered. Both your code and NSWorkspace are probably responding to
the same mechanism.
Have you actually tried using DiskArbitration unmount approval
callbacks? I decided to give it a go and was able to successfully
call FSGetVolumeInfo in the callback. Tested with OS X 10.5.5 and
Xcode 3.1.1.
I did; that's how I noticed that the approval callback happened
after the unmount notification.
So what? Why do you care about this ordering?
Cheers,
Ken
_______________________________________________
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