> > I think it is your misunderstanding of what is going on. > > When the user interacts with a cell (editing, or tracking - in this case, > tracking is happening), the cell is copied. This is required, if you think > about it, since you don't want to have any other cells in the table be > redrawn with that cell that is in the middle of being edited/tracked. After > editing, the regular cell is used again to do drawing for that row/column. > The edited cell needs to be redrawn; you can use - > (void)reloadDataForRowIndexes:(NSIndexSet *)rowIndexes > columnIndexes:(NSIndexSet *)columnIndexes, which in 10.6 basically just does > a setNeedsDisplayInRect:. > > corbin > Thanks for the reply Corbin.
I had not deduced the need for the cell to be copied. I am still somewhat uncertain about the exact logic here. I thought that perhaps the dataSource would be queried for cells that don't support the designated NSTableColumn value binding but that doesn't seem to be the case. Calling -reloadData after I have updated the model in the NSButtonCell action doesn't cause the cell to be redrawn correctly for what ever configuration I have adopted. What does work is: 1. in - outlineView:dataCellForTableColumn:item: construct my popup cell when required. 2.in - outlineView:willDisplayCell:forTableColumn:item: select item in popup cell according to model. In step 1 I construct my cell and select the item that corresponds to my model. This selection is not respected when the cell is drawn unless I implement step 2. I don't quite understand this as the cell is being configured on a per item basis. Anyhow, it seems best to leave all configuration of the cells state to step 2. Regards Jonathan Mitchell Developer Mugginsoft LLP http://www.mugginsoft.com_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com