• 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: When is an NSTextField editor created?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When is an NSTextField editor created?


  • Subject: Re: When is an NSTextField editor created?
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Sun, 26 Jul 2009 21:56:33 -0700


On Jul 26, 2009, at 9:05 PM, Jean-Nicolas Jolivet wrote:

I'm working on an NSTextField subclass and I'm trying to find out when an
NSTextField's editor (i.e. its "currentEditor") is created so I can set its
caret color using the following:[[self currentEditor]
setInsertionPointColor:];


Problem is, each notification/event I try to override is either too soon
(i.e. currentEditor is still null) or too late (i.e. the cursor changes
color when the user starts typing)...

You should be able to use the NSWindow delegate method willReturnFieldEditor:toObject: to return a customized field editor. I'd also think about subclassing NSTextFieldCell and overriding setUpFieldEditorAttributes:, but I've never tried to change the insertion point color.



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >When is an NSTextField editor created? (From: Jean-Nicolas Jolivet <email@hidden>)

  • Prev by Date: Re: Cocoa Document-Based App v. Windows MDI App
  • Next by Date: Re: When is an NSTextField editor created?
  • Previous by thread: When is an NSTextField editor created?
  • Next by thread: Re: When is an NSTextField editor created?
  • Index(es):
    • Date
    • Thread