Re: 'Class' may not respond to +isKindOfClass
Re: 'Class' may not respond to +isKindOfClass
- Subject: Re: 'Class' may not respond to +isKindOfClass
- From: Serge Cohen <email@hidden>
- Date: Thu, 15 Apr 2004 12:07:43 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi;
I guess the main problem here is that 'panClass' is a class, not an
object (or instance of the class).
So the compilers looks for a class method (hence the + before the
method name).
From your mail I have the impression that indeed you have both a class
and an instance (or object) having the same name; is that true?
Then the compiler is likely to be confused (and indeed so do you): when
sending a message to paneClass... are you sending it to the class
(+blabla:...) or to the object (-blabla:...).
The fact that the warning does not reappear is normal: once the source
is compiled, the next time you build it will be compiled only if you
change the source... so you don't even have to close the project and
reopen it, just re-build and warning will be absent.
Still the problem is there!!!
Maybe you want to read a bit about the difference between class and
object (specially for Obj-C, where each class have a special object
'attached' to it).
Hope this helps.
Serge.
Le 15 avr. 04, ` 11:25, Larry Fransson a icrit :
Can anyone tell me why the following would generate the subject
warning?
[paneClass isKindOfClass:[NSObject class]
In this case, paneClass comes either from NSClassFromString() or a
bundle's principal class. I can't find a "+isKindOfClass:" anywhere.
I can find "-isKindOfClass:", though. Also odd is that if I close the
project after receiving the warning, reopen it and then build, the
warning no longer appears.
Larry Fransson
Seattle, WA
_______________________________________________
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.
*******************************************
Serge Cohen
GPG Key ID: 9CBB58FB
*******************************************
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQFAfl705EPeG5y7WPsRAokEAJ45a2YjnqSyxoTW/zyCJ0XybNV72wCdE37W
YQIdHYHY0LiL343UZOLQQwg=
=pgIW
-----END PGP SIGNATURE-----
_______________________________________________
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.