• 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
Re: Why is my NSTableView empty?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is my NSTableView empty?


  • Subject: Re: Why is my NSTableView empty?
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 28 Apr 2008 13:03:25 -0700


On Apr 28, 2008, at 11:32, Robert Cerny wrote:

Actually,
it's not getting called at all. Is it because my method is defined in category? As I wrote already, I'm able to call my methods from gdb so my category is up and running


NSLog(@"%@", [[[ppl arrangedObjects] objectAtIndex:0] lastName]);

as opposed to
Value (ABPeople.arrangedObjects.lastName)

Because the view uses a binding, it's actually going to call 'valueForKeyPath:@"lastName"', isn't it? Normally, you'd expect that to end up at your 'lastName' method via [NSObject valueForKey:], but since it isn't getting to your custom accessor, you know that 'valueForKey:@"lastName"' is itself returning nil or an empty string.


This suggests to me that ABRecord (the superclass of ABPerson, the documentation says) may override valueForKey: with new behavior that doesn't call custom accessors or return anything useful. If that's so, I can only speculate that it's to prevent you using valueForKey when you're "supposed" to use valueForProperty instead.

Does that sound plausible?


_______________________________________________

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: Why is my NSTableView empty?
      • From: "I. Savant" <email@hidden>
References: 
 >Why is my NSTableView empty? (From: Robert Cerny <email@hidden>)
 >Re: Why is my NSTableView empty? (From: "I. Savant" <email@hidden>)
 >Re: Why is my NSTableView empty? (From: Robert Cerny <email@hidden>)
 >Re: Why is my NSTableView empty? (From: "I. Savant" <email@hidden>)
 >Re: Why is my NSTableView empty? (From: Robert Cerny <email@hidden>)
 >Re: Why is my NSTableView empty? (From: "I. Savant" <email@hidden>)
 >Re: Why is my NSTableView empty? (From: Robert Cerny <email@hidden>)
 >Re: Why is my NSTableView empty? (From: "I. Savant" <email@hidden>)
 >Re: Why is my NSTableView empty? (From: Robert Cerny <email@hidden>)

  • Prev by Date: app "do not enter" sign?
  • Next by Date: Re: Why is my NSTableView empty?
  • Previous by thread: Re: Why is my NSTableView empty?
  • Next by thread: Re: Why is my NSTableView empty?
  • Index(es):
    • Date
    • Thread