Getting rid of the field editor after editing
Getting rid of the field editor after editing
- Subject: Getting rid of the field editor after editing
- From: Graham Cox <email@hidden>
- Date: Sat, 26 Jun 2010 17:27:31 +1000
Hi all,
I have a custom subclass of NSCell which is used in a custom NSView (not a control) to draw an array of icons. The cell has an editable text label. I can set up and edit the label fine, but I'm having trouble cleaning up when the edit has finished. What I'm left with is an empty white box where the field editor was which still sets the i-beam cursor when you mouse over it.
I do call -endEditing: on my cell when editing finishes and in there I have tried both removing the field editor directly as well as leaving it to super to do, but so far no joy. I found that the superview of the field editor is a private view class called _NSKeyboardFocusClipView, but even when I back up the hierarchy and remove this from its superview (which I have confirmed is my view), the white box and cursor remain.
What is the correct way to tear down or remove the field editor when editing is complete?
--Graham
_______________________________________________
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