Strange KVC behavior between 10.2 and 10.3 (bug ?)
Strange KVC behavior between 10.2 and 10.3 (bug ?)
- Subject: Strange KVC behavior between 10.2 and 10.3 (bug ?)
- From: Yann Bizeul <email@hidden>
- Date: Sun, 1 Feb 2004 23:43:13 +0100
Hi list...
I have a very strange problem reported by Jaguar tester of SSH Tunnel
Manager (
http://projects.tynsoe.org/stm/)
Here is the method I use to instantiate an SSHTunnel object (a host)
to the preferences :
-(id)initWithDictionary:(NSDictionary*)aDictionary
{
NSEnumerator *e;
NSString *key;
NSLog(@"DEBUG 1");
self = [ super init ];
e = [[ aDictionary allKeys ] objectEnumerator ];
NSLog(@"DEBUG 2");
while (key = [ e nextObject ])
{
NSLog(@"%@ : %@",key,[ aDictionary objectForKey: key ]);
[ self setValue: [ aDictionary objectForKey: key ] forKey: key ];
NSLog(@"endKey");
}
NSLog(@"DEBUG 3");
code = 0;
NSLog(@"DEBUG 4");
if ([[ self valueForKey: @"autoConnect" ] boolValue ])
[ self startTunnel ];
NSLog(@"DEBUG 5");
return self;
}
This works perfectly without warnings in 10.3, but with 10.2, here is
what users reported back to me n Console.app :
2004-02-01 20:43:28.320 SSH Tunnel Manager[445] DEBUG 1
2004-02-01 20:43:28.320 SSH Tunnel Manager[445] DEBUG 2
2004-02-01 20:43:28.321 SSH Tunnel Manager[445] encryption : 3des
2004-02-01 20:43:28.321 SSH Tunnel Manager[445] *** -[SSHTunnel
setValue:forKey:]: selector not recognized
2004-02-01 20:43:28.628 SSH Tunnel Manager[445] *** -[SSHTunnel
setValue:forKey:]: selector not recognized
encryption is a NSString and is declared in .h
Questions :
. How setValue:forKey selector should not exists since I red this was
an NSObject category !
. Why do this act differently in 10.3 and 10.2 ? I'm afraid I'm doing
something I shouldn't in an init: method but I don't see what.
. Why does the error appear twice, but my NSLog only one time ?
I'll appreciate any help !
--
Yann Bizeul - yann at tynsoe.org
http://projects.tynsoe.org/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.