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 itscaret 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 changescolor 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.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com