FROM : j o a r
DATE : Mon Mar 24 05:12:57 2008
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
DATE : Mon Mar 24 05:12:57 2008
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
| Related mails | Author | Date |
|---|---|---|
| charlie | Mar 24, 04:59 | |
| j o a r | Mar 24, 05:12 | |
| Sherm Pendley | Mar 24, 05:18 | |
| Dave Hersey | Mar 24, 05:49 |






Cocoa mail archive

