Fwd: Cell in Selected NSTableView Not Redrawn
Fwd: Cell in Selected NSTableView Not Redrawn
- Subject: Fwd: Cell in Selected NSTableView Not Redrawn
- From: Keary Suska <email@hidden>
- Date: Sat, 21 Jul 2012 10:58:22 -0600
>> On Jul 20, 2012, at 19:03 , Keary Suska wrote:
>>
>>> In an NSTableView I am providing custom cells via tableView:dataCellForTableColumn:row:, based on values represented in other columns. The cell is usually determined when a value is specified via NSPopupButtonCells in two other columns. When an effecting value is changed, I call reloadDataForRowIndexes:columnIndexes: to refresh the cell(s) in question. The problem is that even thought the delegate method is properly called to return the changed NSCell, the NSTableView will not redraw the cell until the row is deselected or is refreshed by some other means--such as obscuring the tableview with another window or clicking in the cell (but only when it's data cell is editable). I have also tried calling setNeedsDisplayInRect:, but that doesn't work either.
>>>
>>> Oddly, it seems to work fine when called from an action method assigned to the NSMenuItems level of a particular NSPopupButtonCell, but not when called from an action method assigned to the NSPopupButtonCell itself. Although I did try to specify the action for the individual NSMenuItems in the other popup, but that didn't work either. The main difference between the two is that one is specified via Interface Builder and the other is generated in code.
For posterity, it is actually not quite the case that one action method works while the other doesn't. It turns out that it works only the first time a change is made. Subsequent changes, using either action method, do not redraw.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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