Re: Getting the Field from a Field Editor
Re: Getting the Field from a Field Editor
- Subject: Re: Getting the Field from a Field Editor
- From: Ken Ferry <email@hidden>
- Date: Sun, 12 Sep 2004 00:45:06 -0400
On Sat, 11 Sep 2004 17:04:03 -0700, Daniel Todd Currie <email@hidden> wrote:
> I subclassed NSTextView to get a certain behavior I need in the field
> editor for my NSTextFields. What I would like to do now, is be able to
> access the field that is currently being edited from inside the field
> editor. The only way I've found so far is:
>
> > [[self nextResponder] nextResponder]
>
> I don't like this way very much, it's really ugly. What I'd really
> like is a -field method that is an accessor for some private instance
> variable or something.
You can use [self delegate] to get at the current text field. This is
documented at <http://developer.apple.com/documentation/Cocoa/Conceptual/TextEditing/Tasks/FieldEditor.html>.
-Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden