Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Sherm Pendley
On Tue, Nov 16, 2010 at 7:28 AM, Sherm Pendley wrote: > On Tue, Nov 16, 2010 at 6:27 AM, Remco Poelstra 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

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Sherm Pendley
On Tue, Nov 16, 2010 at 6:27 AM, Remco Poelstra 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 > > That does not seem to work. > I now

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 (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 Roland King
Yes that wont work, which is why I said NSObject*< protocol> instead of id 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 wrote: > Op 16 nov 2010, om 12:18 heeft Mark W

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 > (the protocol) so it warns that valueForKeyPath: is not found. > It'll also probably complain about methods like respondsToSelector: wh

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Mark Wright
Your AudionetQueueDelegate protocol is probably not inheriting from (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 declar

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Remco Poelstra
ered 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 some

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Roland King
ust 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, >> &g

Re: valueForKeyPath: not found in protocol

2010-11-16 Thread Remco Poelstra
ol. 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 > > Gideon > > On 16/11/2010, at 8:35 PM, Remco Poelstra wrote: > >> Hi, >

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

valueForKeyPath: not found in protocol

2010-11-16 Thread Remco Poelstra
e : NSObject { id delegate; } @property (nonatomic, assign) id delegate; - (void) enqueueCommand:(AudionetCommand *)command; @end @implementation AudionetCommandQueue @synthesize delegate; - (void) enqueueCommand:(AudionetCommand *)command { //Lots of code if ([[delegate valueForKeyPath:

Re: valueForKeyPath

2009-04-30 Thread Steve Cronin
ryWithObjectsAndKeys: @"Bob", @"name", address, @"homeAddress", nil]; NSLog(@"keyPath = %@", [myPerson valueForKeyPath:@"homeAddress.city"]); //BoomTown NSLog(@&q

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:@&qu

RE: valueForKeyPath

2009-04-30 Thread Ulai Beekam
009 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:@"ad

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:@"addr

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 *

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 *

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, @&qu

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 sharedUserDefau

Re: Core Data Entity Relationship -valueForKeyPath: question

2008-06-30 Thread Jamie Phelps
urns YES? I know for a fact that some of my Item >> objects should return NO for this. >> >> -(BOOL)sold{ >> return ([self valueForKeyPath:@"[EMAIL PROTECTED]"] > 0); >> } >> > > It's not a KVC

Re: Core Data Entity Relationship -valueForKeyPath: question

2008-06-30 Thread Quincey Morris
y the following code always returns YES? I know for a fact that some of my Item objects should return NO for this. -(BOOL)sold{ return ([self valueForKeyPath:@"[EMAIL PROTECTED]"] > 0); } It's not a KVC issue. You called a method that returns a pointer, then you compa

Core Data Entity Relationship -valueForKeyPath: question

2008-06-30 Thread Jamie Phelps
a fact that some of my Item objects should return NO for this. -(BOOL)sold{ return ([self valueForKeyPath:@"[EMAIL PROTECTED]"] > 0); } Thanks in advance! Jamie ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not