valueForKeyPath: not found in protocol

2010-11-16 Thread Remco Poelstra
valueForKeyPath:@audionetDevices.address] isEqual: []]) {}; } @end I get the warning that valueForKeyPath: is not found in the protocols. If I change the instance variable to id AudionetQueueDelegate,NSKeyValueCoding, I get the error that the NSKeyValueCoding protocol can not be found. If I also

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Gideon King
AFAIK, when something is referenced as a protocol like that, the *only* methods it knows about are the ones in the protocol. If you just cast the delegate to type id, you should be OK (I have encountered similar situations where this solution worked) [(id)delegate valueForKeyPath:... HTH

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Remco Poelstra
just cast the delegate to type id, you should be OK (I have encountered similar situations where this solution worked) [(id)delegate valueForKeyPath:... HTH Gideon On 16/11/2010, at 8:35 PM, Remco Poelstra wrote: Hi, I've somewhat the same problem as a recent thread, but I

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Roland King
just cast the delegate to type id, you should be OK (I have encountered similar situations where this solution worked) [(id)delegate valueForKeyPath:... HTH Gideon On 16/11/2010, at 8:35 PM, Remco Poelstra wrote: Hi, I've somewhat the same problem as a recent thread, but I can't

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Remco Poelstra
) [(id)delegate valueForKeyPath:... HTH Gideon On 16/11/2010, at 8:35 PM, Remco Poelstra wrote: Hi, I've somewhat the same problem as a recent thread, but I can't fix it with what was suggested in that thread. I've to following class: #import Foundation/Foundation.h #import

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Mark Wright
Your AudionetQueueDelegate protocol is probably not inheriting from NSObject (the protocol) so it warns that valueForKeyPath: is not found. It'll also probably complain about methods like respondsToSelector: which is also part of the NSObject protocol. You need to write your protocol

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Remco Poelstra
Op 16 nov 2010, om 12:18 heeft Mark Wright het volgende geschreven: Your AudionetQueueDelegate protocol is probably not inheriting from NSObject (the protocol) so it warns that valueForKeyPath: is not found. It'll also probably complain about methods like respondsToSelector: which is also

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Roland King
Yes that wont work, which is why I said NSObject* protocol instead of idNSObject,protocol valueForKeyPath: is not defined in the NSObject protocol, but is defined on NSObject itself which is why it works. On Nov 16, 2010, at 19:27, Remco Poelstra re...@beryllium.net wrote: Op 16 nov 2010

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Mark Wright
On 16 Nov 2010, at 11:27:22, Remco Poelstra wrote: Op 16 nov 2010, om 12:18 heeft Mark Wright het volgende geschreven: Your AudionetQueueDelegate protocol is probably not inheriting from NSObject (the protocol) so it warns that valueForKeyPath: is not found. It'll also probably complain

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Sherm Pendley
On Tue, Nov 16, 2010 at 6:27 AM, Remco Poelstra re...@beryllium.net wrote: Op 16 nov 2010, om 12:18 heeft Mark Wright het volgende geschreven: You need to write your protocol declaration in AudionetQueueDelegateProtocol.h as: @protocol AudionetQueueDelegate NSObject That does not seem

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Sherm Pendley
On Tue, Nov 16, 2010 at 7:28 AM, Sherm Pendley sherm.pend...@gmail.comwrote: On Tue, Nov 16, 2010 at 6:27 AM, Remco Poelstra re...@beryllium.netwrote: Op 16 nov 2010, om 12:18 heeft Mark Wright het volgende geschreven: You need to write your protocol declaration in

valueForKeyPath

2009-04-30 Thread Steve Cronin
Folks; I have a mutable dictionary 'myPerson' which has a key=@address. The object stored at @address is another mutable dictionary. someCity = [myPerson valueForKeyPath:@address.city] -- nil someCity = [[myPerson valueForKey:@address] valueForKey:@city] -- expected value Why does

RE: valueForKeyPath

2009-04-30 Thread Ulai Beekam
-0500 Subject: valueForKeyPath Folks; I have a mutable dictionary 'myPerson' which has a key=@address. The object stored at @address is another mutable dictionary. someCity = [myPerson valueForKeyPath:@address.city] -- nil someCity = [[myPerson valueForKey:@address] valueForKey:@city

Re: valueForKeyPath

2009-04-30 Thread Jim Puls
-dev@lists.apple.com Date: Thu, 30 Apr 2009 19:00:51 -0500 Subject: valueForKeyPath Folks; I have a mutable dictionary 'myPerson' which has a key=@address. The object stored at @address is another mutable dictionary. someCity = [myPerson valueForKeyPath:@address.city] -- nil someCity = [[myPerson

Re: valueForKeyPath

2009-04-30 Thread Steve Cronin
: @Bob, @name, address, @homeAddress, nil]; NSLog(@keyPath = %@, [myPerson valueForKeyPath:@homeAddress.city]); //BoomTown NSLog(@keys = %@, [[myPerson valueForKey:@homeAddress] valueForKey:@city]); //BoomTown On Apr

NSDictionary valueForKeyPath:

2008-12-14 Thread jonat...@mugginsoft.com
I was surprised to learn that a hierarchy of NSDictionary objects can be queried with valueForKeyPath: NSDictionary *dict0 = [NSDictionary dictionaryWithObjectsAndKeys:@got me!, @2, nil]; NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:dict0, @1, nil]; NSLog([dict

Re: NSDictionary valueForKeyPath:

2008-12-14 Thread Ken Thomases
On Dec 14, 2008, at 9:21 AM, jonat...@mugginsoft.com wrote: I was surprised to learn that a hierarchy of NSDictionary objects can be queried with valueForKeyPath: NSDictionary *dict0 = [NSDictionary dictionaryWithObjectsAndKeys:@got me!, @2, nil]; NSDictionary *dict = [NSDictionary

Re: NSDictionary valueForKeyPath:

2008-12-14 Thread jonat...@mugginsoft.com
On 14 Dec 2008, at 16:06, Ken Thomases wrote: I was surprised to learn that a hierarchy of NSDictionary objects can be queried with valueForKeyPath: NSDictionary *dict0 = [NSDictionary dictionaryWithObjectsAndKeys:@got me!, @2, nil]; NSDictionary *dict = [NSDictionary

NSUserDefaults and valueForKeyPath ?

2008-12-09 Thread Arthur C.
I've been busy adding some structure to the NSUserDefaults in my app. So I would have a dictionary like 'generalPrefs' with some key/value pairs, separate from 'otherPrefs' etc. Now I wonder why the following doesn't work: [[NSUserDefaultsController sharedUserDefaultsController] valueForKeyPath