• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTableDataSource: objectValueForTableColumn Working but setObjectValue Passing Bad Parameters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableDataSource: objectValueForTableColumn Working but setObjectValue Passing Bad Parameters


  • Subject: NSTableDataSource: objectValueForTableColumn Working but setObjectValue Passing Bad Parameters
  • From: Grant Erickson <email@hidden>
  • Date: Tue, 24 Mar 2009 09:20:19 -0700
  • Thread-topic: NSTableDataSource: objectValueForTableColumn Working but setObjectValue Passing Bad Parameters

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

  • Follow-Ups:
    • Re: NSTableDataSource: objectValueForTableColumn Working but setObjectValue Passing Bad Parameters
      • From: Grant Erickson <email@hidden>
    • Re: NSTableDataSource: objectValueForTableColumn Working but setObjectValue Passing Bad Parameters
      • From: Alexander Spohr <email@hidden>
  • Prev by Date: Re: Class gets EXC_BAD_ACCESS only as NSOperation
  • Next by Date: Re: iPhone Tab bar Question
  • Previous by thread: Re: Cocoa + XBee
  • Next by thread: Re: NSTableDataSource: objectValueForTableColumn Working but setObjectValue Passing Bad Parameters
  • Index(es):
    • Date
    • Thread