Chuck,

* You really shouldn't suppress these warnings

* If you use ObjC 2.0 properties you don't have to write those accessors in the first place, and

* If you use ObjC 2.0 properties, you can use this form without warnings:

        self.foo = foo;

j o a r


On Mar 23, 2008, at 8:59 PM, charlie wrote:

For years, I've been doing this:

- (void)setController:(id)_controller
{
if (!_controller)
{
  return;
}
controller = [_controller retain];
}



It has always irked me having to work around namespace conflicts between method args and instance variables.

So, today I decided to try this for my next project...

- (void)setController:(id)controller
{
if (!controller)
{
  return;
}
self->controller = [controller retain];
}



I works fine.  But does not fix the warning itself.




So, the question stands.... How do I suppress the warning.


- Chuck

_______________________________________________

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]

Reply via email to