Dear list,
Suppose I have a formal protocol which defines a method:
- (NSArray*)objects;
Then I implement a class which implements this protocol. To do that I make a
property:
@property (nonatomic, readwrite, retain) NSArray * objects;
and put the appropriate synthesize statement in the implementation.
I get compiler warnings that this class doesn't implement the protocol. It
seems it doesn't take the synthesized getter as being an implementation of the
-objects method.
I also tried explicitly adding the implementation, but the warning remains:
- (NSArray*) objects
{
return objects;
}
Am I doing something wrong here, or is it not possible to use a property to
satisfy a protocol?
Best wishes,
Martin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer
Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: [email protected]
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]