Re: Help with runtime warning
Re: Help with runtime warning
- Subject: Re: Help with runtime warning
- From: Christian Brunschen <email@hidden>
- Date: Thu, 9 Dec 2004 00:14:33 +0000
On 9 Dec 2004, at 00:09, Robbie Haertel wrote:
I get the following runtime warning:
-[NSCFDictionary isKindOf:]: warning: Object compatibility method has
been executed at least once. Convert source code off it NOW!
I think it is happening in the datasource to my outline view. In all
of my datasource methods I check if item is a dictionary: if ([item
isKindOf:[NSDictionary class]]). This obviously gets called hundreds
of times in my program, but I only get the error once (the error
message implies it will only occur once).
Does anyone no what this message means? What are its implications?
What do I do to fix it (my datasource depends on the ability to detect
a dictionary and the code works perfectly fine despite the error
message)?
The selector 'isKindOf:' is defined in the class 'Object' which is not
actually a part of the Cocoa libraries. It is included mainly for
backward compatibility with really old Objective-C programs. The
correct selector to use in Cocoa is 'isKindOfClass:' . Try simply
replacing 'isKindOf:' with 'isKindOfClass:', which should solve your
problem.
Thanks.
Best wishes,
Robbie
// Christian Brunschen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden