2010-01-28 4 views
0

NSTextField가 초점을 맞춘 시점을 어떻게 알 수 있습니까?NSTextField 초점을 맞 췄습니까?

사용자가 NSTextField에서 마우스를 클릭했을 때 알려주는 대리자 메서드가 있습니까?

감사

답변

2

서브 클래스 NSTextField있는 및 -becomeFirstResponder 우선합니다.

+0

감사합니다. 마이크 - NSTextField가 첫 번째 응답자가되었을 때 NSTextField가 알림을 보낼 수 있기를 바랬습니다. – TomH

+0

Mike,'NSTextField'의'-becomeFirstResponder'는 Mac OS X v10.5부터 사용할 수 없습니다. (http://developer.apple.com/library/mac/#documentation/cocoa/reference/ApplicationKit/Classes/ NSTextView_Class/DeprecationAppendix/부록 ADeprecatedAPI.html). – dzolanta

+0

Deprecation ≠ "사용할 수 없음". 또한, 'becomeFirstResponder'는'NSResponder'에서 선언됩니다; deprecation이 말하는 것은이 메소드를 * 호출하는 것이 좋지 않다는 것입니다. 그것을 서브 클래 싱하는 것이 좋습니다. –

관련 문제