NSOutlineView multi cell type binding query
NSOutlineView multi cell type binding query
- Subject: NSOutlineView multi cell type binding query
- From: "email@hidden" <email@hidden>
- Date: Tue, 5 Oct 2010 11:53:05 +0100
Morning
My NSOutlineView binds its NSTableColumn instances to NSTextFieldCells using NSValueBinding.
Some cells are required to contain NSPopUpButtonCell instances so the cell type is manipulated in - outlineView:dataCellForTableColumn:item:
NSPopUpButtonCell doesn't support value binding so the normal target->action approach is adopted to update the model.
However it appears that the binding machinery causes the NSPopUpButtonCell selection to be reset after the user has interacted with the control.
I therefore have to resync the NSPopUpButtonCell selection to the model in - outlineView:willDisplayCell:forTableColumn:item:
Is this expected behaviour using multiple NSCell subclasses or is it bug like?
Or should I try and directly bind the NSPopUpButtonCell instance in - outlineView:dataCellForTableColumn:item:?
Presumable if a cell doesn't support a particular binding its state should remain unaltered.
Regards
Jonathan Mitchell
Developer
Mugginsoft LLP
http://www.mugginsoft.com
_______________________________________________
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