简体   繁体   English

哪个NSTextView是第一响应者?

[英]Which NSTextView is the First Responder?

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. 我正在进行Cocoa编程练习,我需要能够确定当前正在编辑两个NSTextView对象中的哪一个。 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. 任何帮助,将不胜感激。

I suggest you to read the Cocoa Event-Handling Guide , and especially the section called Responder-Related Tasks . 我建议你阅读Cocoa事件处理指南 ,特别是有关响应者相关任务的部分。 You will find all the information you need. 您将找到所需的所有信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM