• 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
Getting rid of the field editor after editing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Getting rid of the field editor after editing
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Custom Toolbar
  • Next by Date: Re: Getting rid of the field editor after editing
  • Previous by thread: Re: NSMenuDelegate menuDidClose called before NSMenuItem's action?
  • Next by thread: Re: Getting rid of the field editor after editing
  • Index(es):
    • Date
    • Thread