Re: NSTableDataSource: objectValueForTableColumn Working but setObjectValue Passing Bad Parameters
Re: NSTableDataSource: objectValueForTableColumn Working but setObjectValue Passing Bad Parameters
- Subject: Re: NSTableDataSource: objectValueForTableColumn Working but setObjectValue Passing Bad Parameters
- From: Alexander Spohr <email@hidden>
- Date: Tue, 24 Mar 2009 17:33:49 +0100
please show us your setObjectValue from the .m
atze
Am 24.03.2009 um 17:20 schrieb Grant Erickson:
I am implementing an NSTableView where the data source is a list of
devices
from the IO registry. Most of the fields are just read-only text
cells;
however, one is an NSButtonCell and another an NSPopUpButtonCell
controlling
device behavior when they change state:
ID Active Status Value IOKit Path
1 [x] [ Pop-up ] 10 IOService:/
AppleACPIPlatformExpert...
Consequently, I implemented setObjectValue to handle when these
cells are
manipulated and changed.
However, I am finding that setObjectValue seems to be passing
incorrect and
unexpected parameters relative to those I receive in
objectValueForTableColumn. From the console:
tableView: 0x1281f0 objectValueForTableColumn: 0x129c00 (ID) row: 0
tableView: 0x1281f0 objectValueForTableColumn: 0x12cfe0 (Active)
row: 0
tableView: 0x1281f0 objectValueForTableColumn: 0x1333b0 (Value)
row: 0
tableView: 0x1281f0 objectValueForTableColumn: 0x129070 (Status)
row: 0
tableView: 0x1281f0 objectValueForTableColumn: 0x137b60 (Path)
row: 0
That all seems correct following awakeFromNib in my application
controller.
tableView: 0x1281f0 setObjectValue: 0x129070 forTableColumn:
0x181530
((null)) row: -1854878728
tableView: 0x1281f0 setObjectValue: 0x12cfe0 forTableColumn:
0x177b70
((null)) row: 41056
It would seem that the object and column parameters are potentially
swapped
and the row parameter is just random data.
Memory corruption seems to be the first obvious debug choice;
however, if I
narrow my program down to just the NIB and these two NSTableDataSource
methods, I see the same results.
Any insights on additional stones to overturn here? Is
setObjectValue not
the correct way to handle these data edits/updates?
Thanks,
Grant
_______________________________________________
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
_______________________________________________
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