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
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
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
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
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
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
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
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
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,
>
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
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:
ryWithObjectsAndKeys:
@"Bob",
@"name",
address,
@"homeAddress",
nil];
NSLog(@"keyPath = %@", [myPerson
valueForKeyPath:@"homeAddress.city"]); //BoomTown
NSLog(@&q
-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
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
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
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 *
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 *
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
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
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
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
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
22 matches
Mail list logo