Re: When is an NSTextField editor created?
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