Protocol-conforming object does not include retain?

2008-07-11 Thread Steve Weller
I have a protocol and an object that conforms to that protocol referenced by an ivar: @protocol FKPointArraySourcing -(NSInteger)fooMethod; @end @interface FKObject : NSObject FKPointArraySourcing { id FKPointArraySourcing mGrid; } If I attempt to retain the ivar like this: [mGrid

Re: Protocol-conforming object does not include retain?

2008-07-11 Thread Bill Bumgarner
On Jul 11, 2008, at 7:39 PM, Steve Weller wrote: Why is this addition needed? I don't see it used in other code. It's as though the compiler believes that conformance to a protocol implies that it exclusively provides those methods, which is not the idea of protocol conformance at all.

Re: Protocol-conforming object does not include retain?

2008-07-11 Thread Markus Spoettl
On Jul 11, 2008, at 7:59 PM, Bill Bumgarner wrote: id mGrid; ... you would be indicating to the compiler that mGrid might potentially respond to any method ever seen. I'm either misunderstand what you're saying or something is wrong with my compiler because this: id bar; [bar