NSPopUpButtonCell releasing menu item bug?
NSPopUpButtonCell releasing menu item bug?
- Subject: NSPopUpButtonCell releasing menu item bug?
- From: Kyle Sluder <email@hidden>
- Date: Thu, 19 Mar 2009 15:19:55 -0400
Hi all,
I'm looking to use an NSPopUpButtonCell as the header cell of table
columns in my KSStaticTreeController inspector. Because I want to
maintain the header column titles, I configure the cell with
-setUsesItemFromMenu:NO, which means I have to provide a menu item
using -setMenuItem:. If I resize the columns such that the last
column does not fill the remaining space in the table view,
NSTableHeaderView attempts to use the same cell as the last column to
draw the rest of the header. It first empties the cell's title and
asks it to draw. However, this somehow results in deallocating the
menu item, even though I have explicitly leaked it in the first place.
Is this a bug in NSPopUpButtonCell? I've put a really stripped-down
example that demonstrates the problem on my site at
http://www.cs.loyola.edu/~ksluder/SampleCocoaApp.dmg. In the
meantime, I figure the easiest way to work around it now is to write
my own subclass of NSTableHeaderCell that uses the popup cell solely
for the menu functionality.
--Kyle Sluder
_______________________________________________
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