Re: NSOutlineView multi cell type binding query
Re: NSOutlineView multi cell type binding query
- Subject: Re: NSOutlineView multi cell type binding query
- From: Quincey Morris <email@hidden>
- Date: Tue, 5 Oct 2010 16:06:57 -0700
On Oct 5, 2010, at 15:36, email@hidden wrote:
> I have a separate NSPopUpButtonCell that I recycle and configure as and when required.
> The issue is that when the NSPopUpButtonCell is selected and the user selects an item from the popup NSMenu the user's selection is reset.
> ie: say the user selects item 3, when the NSMenu is dismissed the NSPopupButtonCell is reset to display item 1.
>
> In the action method the NSPopupButtonCell selected item is correct (item 3) and I update my model accordingly.
> It is after this that the NSPopupButtonCell selection is reset.
> I have to nudge it back to the required model state in - outlineView:willDisplayCell:forTableColumn:item:
What does "nudge" mean here? If you mean that outlineView:willDisplayCell:forTableColumn:item: is being called again, then, yes, you can't expect the cell to be configured as it was, even if you're reusing the same cell.
If you mean you're forcing a display update *in order to* get outlineView:willDisplayCell:forTableColumn:item: called again so that the view shows the correct setting, then I'd begin to suspect that your model property isn't properly KVO compliant.
Incidentally, are you binding the cell's selectedIndex (or whatever), or the table column's?
_______________________________________________
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