Re: NSTextView redraw while resigning first responder (sequel)
Re: NSTextView redraw while resigning first responder (sequel)
- Subject: Re: NSTextView redraw while resigning first responder (sequel)
- From: vincent habchi <email@hidden>
- Date: Mon, 9 Aug 2010 20:08:43 +0200
Le 9 août 2010 à 19:03, Kyle Sluder a écrit :
> Oops. We have custom analogues of NSTextFieldCell that allow us to
> specify an NSTextStorage in -setObjectValue:. I forgot that
> NSTextFieldCell doesn't let you do this; it always uses its own layout
> manager.
>
> I believe you will need to implement drawing yourself.
Hmmm. I was thinking about something, but it maybe stupid. If I back the NSTextField with a CALayer, it will get the glyphs drawn on it, no? Then I could snapshot the CALayer in the -resignFirstResponder: method, somehow make a copy that I would overlay, and then return to normal behavior on -becomesFirstResponder:? That would save the burden of laying out glyphs by myself.
Vincent_______________________________________________
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