Re: Problem using dictionary

2010-10-18 Thread Quincey Morris
On Oct 18, 2010, at 20:52, Abhi Beckert wrote: > [NSObject valueForKey:] has nothing to do with dictionaries. It's an internal > API feature that's used throughout the framework. The foo.bar syntax is > essentially an alias for [foo valueForKey:@"bar"]. Understanding exactly how > this method w

Re: Problem using dictionary

2010-10-18 Thread Abhi Beckert
On 2010-10-09, at 6:14 AM, Remco Poelstra wrote: > That seems reasonable, but makes the documentation harder to read. In the old > days where I used Delphi, the inherited methods were all shown as such and it > gives a direct overview of what is available. Especially in this case, where > the

Re: Problem using dictionary

2010-10-09 Thread Matt Neuburg
>Date: Fri, 8 Oct 2010 13:47:18 +0200 >From: Remco Poelstra >Subject: Re: Problem using dictionary > >Ah, I should use valueForKeyPath:. Is there a reason valueForKey: is >documented directly but valueForKeyPath: is not? First off, this is an extremely common mistake. At lea

Re: Problem using dictionary

2010-10-08 Thread Fritz Anderson
On 8 Oct 2010, at 3:14 PM, Remco Poelstra wrote: > That seems reasonable, but makes the documentation harder to read. In the old > days where I used Delphi, the inherited methods were all shown as such and it > gives a direct overview of what is available. Especially in this case, where > the v

Re: Problem using dictionary

2010-10-08 Thread Remco Poelstra
Op 8 okt 2010, om 20:34 heeft Quincey Morris het volgende geschreven: On Oct 8, 2010, at 04:47, Remco Poelstra wrote: Is there a reason valueForKey: is documented directly but valueForKeyPath: is not? They're both documented, but it requires familiarity with how to read the Cocoa document

Re: Problem using dictionary

2010-10-08 Thread Quincey Morris
On Oct 8, 2010, at 04:47, Remco Poelstra wrote: > Is there a reason valueForKey: is documented directly but valueForKeyPath: is > not? They're both documented, but it requires familiarity with how to read the Cocoa documentation, which is an important point that goes beyond just this example.

Re: Problem using dictionary

2010-10-08 Thread Remco Poelstra
Ah, I should use valueForKeyPath:. Is there a reason valueForKey: is documented directly but valueForKeyPath: is not? Kind regards, Remco Poelstra Op 8 okt 2010, om 13:34 heeft Remco Poelstra het volgende geschreven: > Hi, > > I've the following code: > > NSDictionary *dict=[[NSDictionary al

Problem using dictionary

2010-10-08 Thread Remco Poelstra
Hi, I've the following code: NSDictionary *dict=[[NSDictionary alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Indexes" ofType:@"plist"]]; //This is actually a global initialized in +initialize. NSString *key=[NSString stringWithFormat:@"%...@.%@",page,property]; NSLog(@"