FROM : Sherm Pendley
DATE : Mon Mar 24 05:18:50 2008
On Sun, Mar 23, 2008 at 11:59 PM, charlie <<email_removed>> wrote:
>
> 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.
You suppress the warning by fixing the problem it's warning you about. Yes,
it's just that simple.
For example, the above could be rewritten as:
- (void)setController:(id)newController {
if (!controller) return;
controller = [newController retain];
}
sherm--
DATE : Mon Mar 24 05:18:50 2008
On Sun, Mar 23, 2008 at 11:59 PM, charlie <<email_removed>> wrote:
>
> 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.
You suppress the warning by fixing the problem it's warning you about. Yes,
it's just that simple.
For example, the above could be rewritten as:
- (void)setController:(id)newController {
if (!controller) return;
controller = [newController retain];
}
sherm--
| 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

