0

We have a drop-down menu of volumes in our UI, and I'd like to update it when a new disk is mounted. In the Classic days, this would involve watching for a diskEvt event. In Carbon, I think this was kEventClassVolume. What's the Cocoa equivalent?

(A pointer into Apple's documentation on this would satisfy the question. I've been unable to find anything!)

Quinn Taylor
  • 44,553
  • 16
  • 113
  • 131
Steven Fisher
  • 44,462
  • 20
  • 138
  • 192

2 Answers2

2

NSWorkspace posts NSWorkspaceDidMountNotification and friends on its notification center.

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
0

Disk Arbitration is responsible for those notifications. It's not written in Cocoa.

Azeem.Butt
  • 5,855
  • 1
  • 26
  • 22
  • It does have an API, though: http://developer.apple.com/mac/library/documentation/Darwin/Reference/DiscArbitrationFramework/ – Peter Hosey Apr 11 '10 at 22:46