• 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: Controlling selection in NSTextFields
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Controlling selection in NSTextFields


  • Subject: Re: Controlling selection in NSTextFields
  • From: "Erik M. Buck" <email@hidden>
  • Date: Sat, 10 Nov 2001 19:50:38 -0600

> Anyway, why is it called a "field editor" in some contexts and a
> "text object" in others? Just to trip me up? :-)

Text objects are used for lots of things. The field editor is a text object
shared by (usually) all of the text fileds in a window and used to support
editing fields. All field editors are text objects but not all text objects
are field editors.

You are attempting something pretty complex. I highly recommend that you
read about field editors before continuing. There is lots of documentation
and well documented ways of using your own custom filed editor for a
particular control.

>
> I also tried to implement:
> - (void)mouseUp:(NSEvent*)theEvent
> in my NSTextField subclass, this would of course allow me to check
> the selection after the user finishes messing around with it, but it
> turns out mouseUp is not called on a mouse click. The NSView docs
> just mention mouse-down events, never mouse-up events; I at first
> supposed they're disabled by default as they were in previous Mac
> OS's, and needed to be turned on by some obscure API.
>

I have never tried what you are attempting. Have you considered using
multiple different text fields. Make some of them non-editable. The user
will only be able to place the cursor in the editable fields.


  • Follow-Ups:
    • Re: Controlling selection in NSTextFields
      • From: Rainer Brockerhoff <email@hidden>
References: 
 >Controlling selection in NSTextFields (From: Rainer Brockerhoff <email@hidden>)
 >Re: Controlling selection in NSTextFields (From: "Erik M. Buck" <email@hidden>)
 >Re: Controlling selection in NSTextFields (From: Rainer Brockerhoff <email@hidden>)

  • Prev by Date: Re: Threading, save panels, and segfaults
  • Next by Date: can't cache image REPOST... Solution
  • Previous by thread: Re: Controlling selection in NSTextFields
  • Next by thread: Re: Controlling selection in NSTextFields
  • Index(es):
    • Date
    • Thread