FROM : glenn andreas
DATE : Fri Jun 02 20:22:54 2006
On Jun 2, 2006, at 12:28 PM, Lon Giese wrote:
> as the author clearly stated:
>
>> and the instance variable browser is defined as (NSBrowser *) for
>> this call:
>> browserDelegate = [[BrowserDelegate alloc] initWith:browser];
>
> (I am pretty sure he meant to say 'method parameter', not 'instance
> variable', because the class has no instance variable named
> browser. just a little terminology mixup, no biggie) Which is
> absolutely correct and should not cause a warning. And IMHO the way
> the identifiers are named is not causing this problem.
>
My guess is that this is a problem that since "alloc" returns an id,
and it finds "initWith:" in several places in the user's code, in
different classes - which is why there are naming conventions for
things like this that it should be called "initWithBrowser". It ends
up picking a different initWith: method (one that doesn't take an
NSBrowser), and thus the warning.
If one were to do:
[(BrowserDelegate *)[BrowserDelegate alloc] initWith: browser];
the problem would go away (assuming this is the problem). The
correct solution, as mentioned previously, is to use more descriptive
method names.
Glenn Andreas <email_removed>
<http://www.gandreas.com/> wicked fun!
quadrium2 | build, mutate, evolve, animate | images, textures,
fractals, art
DATE : Fri Jun 02 20:22:54 2006
On Jun 2, 2006, at 12:28 PM, Lon Giese wrote:
> as the author clearly stated:
>
>> and the instance variable browser is defined as (NSBrowser *) for
>> this call:
>> browserDelegate = [[BrowserDelegate alloc] initWith:browser];
>
> (I am pretty sure he meant to say 'method parameter', not 'instance
> variable', because the class has no instance variable named
> browser. just a little terminology mixup, no biggie) Which is
> absolutely correct and should not cause a warning. And IMHO the way
> the identifiers are named is not causing this problem.
>
My guess is that this is a problem that since "alloc" returns an id,
and it finds "initWith:" in several places in the user's code, in
different classes - which is why there are naming conventions for
things like this that it should be called "initWithBrowser". It ends
up picking a different initWith: method (one that doesn't take an
NSBrowser), and thus the warning.
If one were to do:
[(BrowserDelegate *)[BrowserDelegate alloc] initWith: browser];
the problem would go away (assuming this is the problem). The
correct solution, as mentioned previously, is to use more descriptive
method names.
Glenn Andreas <email_removed>
<http://www.gandreas.com/> wicked fun!
quadrium2 | build, mutate, evolve, animate | images, textures,
fractals, art
| Related mails | Author | Date |
|---|---|---|
| Graham | Jun 1, 22:39 | |
| Andrei Tchijov | Jun 1, 23:50 | |
| Shawn Erickson | Jun 2, 00:11 | |
| Mike Abdullah | Jun 2, 00:12 | |
| Joshua Pennington | Jun 2, 00:35 | |
| Graham | Jun 2, 12:02 | |
| Lon Giese | Jun 2, 13:41 | |
| Nir Soffer | Jun 2, 14:19 | |
| Jerrod Fowkes | Jun 2, 14:51 | |
| Michael Ash | Jun 2, 17:42 | |
| Lon Giese | Jun 2, 19:28 | |
| glenn andreas | Jun 2, 20:22 | |
| Lon Giese | Jun 2, 22:32 | |
| I. Savant | Jun 2, 22:38 |






Cocoa mail archive

