哪个 NSTextView 是第一响应者?
我正在进行 Cocoa 编程练习,我需要能够确定当前正在编辑两个 NSTextView 对象中的哪一个。我认为这与找到第一响应者并检查它是否等于一个文本字段或另一个文本字段有关,但我无法完全让它工作。任何帮助将不胜感激。
I'm working on a Cocoa programming exercise, and I need to be able to determine which of two NSTextView objects is currently being edited. I think it's something to do with finding the first responder and checking to see if it's equal to one text field or another, but I can't quite get it to work. Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您阅读 Cocoa 事件处理指南,特别是名为 响应程序相关任务。您将找到您需要的所有信息。
I suggest you to read the Cocoa Event-Handling Guide, and especially the section called Responder-Related Tasks. You will find all the information you need.