• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Help with runtime warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Help with runtime warning (From: Robbie Haertel <email@hidden>)

  • Prev by Date: Help with runtime warning
  • Next by Date: Re: Protocol implementation split between base and derived class
  • Previous by thread: Help with runtime warning
  • Next by thread: Value With Pattern formatting with Bindings
  • Index(es):
    • Date
    • Thread