Re: Warnings that won't go away
Re: Warnings that won't go away
- Subject: Re: Warnings that won't go away
- From: Sherm Pendley <email@hidden>
- Date: Wed, 30 Nov 2005 02:13:51 -0500
On Nov 30, 2005, at 1:52 AM, Tom Jones wrote:
Here's some code from MyDocument.m
[[self playlist] insertObject:theItem inPlaylistItemsAtIndex: [[self
playlist] countOfPlaylistItems]];
I get two warnings on this line:
warning: no '-countOfPlaylistItems' method found
warning: no '-insertObject:inPlaylistItemsAtIndex:' method found
The code executes correctly, but how do I get rid of the warnings?
Declare -playlist as returning an instance of the class that
implements those methods, instead of an id.
-or-
Typecast the return value by using "(SomeClass*)[self playlist]" in
place of "[self playlist]".
-or-
Add declarations (but not implementations) of these methods as a
category of NSObject.
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
_______________________________________________
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