On Apr 27, 2009, at 11:48 AM, David Alter wrote:

How can I get notification if the Selection changed in a NSTextField. This
works with a NSTextView by setting up the delegate -
(void)textViewDidChangeSelection:(NSNotification *)aNotification

A NSTextField uses a NSTextView for its editing. And the NSTextField is the delegate to the NSTextView. If I need to get the selection changed should I
be subclassing NSTextField and placing the textViewDidChangeSelection
delegate method in there. Or is there a simpler solution to this.


Once you get a reference to the field editor, you can observe its NSTextViewDidChangeSelectionNotification.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to