可可相当于diskEvt/kEventClassVolume?
我们的 UI 中有一个卷的下拉菜单,我想在安装新磁盘时更新它。在经典时代,这将涉及监视 diskEvt
事件。在 Carbon 中,我认为这是 kEventClassVolume。可可相当于什么?
(指向苹果公司的相关文档就可以解决这个问题。我一直找不到任何东西!)
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!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
NSWorkspace 帖子
NSWorkspaceDidMountNotification
和朋友 其通知中心。NSWorkspace posts
NSWorkspaceDidMountNotification
and friends on its notification center.磁盘仲裁负责这些通知。它不是用 Cocoa 写的。
Disk Arbitration is responsible for those notifications. It's not written in Cocoa.