• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting the Field from a Field Editor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Getting the Field from a Field Editor (From: Daniel Todd Currie <email@hidden>)

  • Prev by Date: Re: ABI workaround
  • Next by Date: Re: Using NSSmallCapsFontMask?
  • Previous by thread: Getting the Field from a Field Editor
  • Next by thread: Preview of printer output in an NSView????
  • Index(es):
    • Date
    • Thread