Skip navigation.
 
mlRe: Newbie error
FROM : Lon Giese
DATE : Fri Jun 02 19:28:06 2006

>> if browser were not the proper type for the interface he would get an
>> (IMHO)
>>
>> "incompatible pointer" warning

>
> Well, that's wrong, as a simple test will show:


Hmmm...  I ran your code example and it clearly says

Test.m:25: passing arg 1 of `test:' from incompatible pointer type

Maybe you are using a different version of GCC?
but why would they change the warning text? that doesn't make much 
sense.
I still think it's a bug in xcode ( more or less  succinctly: GCC ).

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.

Did you try recasting browser variable anyway. perhaps it is already 
the correct type but recasting it might jump start the compiler and 
work around the bug?

So, Does the author have the latest version of xcode? or not? Though I 
doubt that would help, but its worth a try. I'm guessing he does have 
the latest version. This is definitely a question for an xcode expert. 
Is there any easy way to get a work around for a bug without being 
charged for a tech support call?

It can be pretty stressful when learning a new language and the IDE has 
bugs in it.

Lon


WooHoo the ultimate Mac App for 'The Sims 2' power users.
http://www.modthesims2.com/showthread.php?p=1239629
On Jun 2, 2006, at 8:42 AM, Michael Ash wrote:

> On 6/2/06, Lon Giese <<email_removed>> wrote:
>> > I am getting this error:
>> >
>> > /Users/graham/Projects/Pre FOF/Controller.m:13: warning: passing
>> > argument 1 of 'initWith:' from distinct Objective-C type
>> >

>>
>> if browser were not the proper type for the interface he would get an
>> (IMHO)
>>
>> "incompatible pointer" warning

>
> Well, that's wrong, as a simple test will show:
>
> @interface Foo { }
> - (void)test: (NSString *)x;
> @end
> ...
> [foo test: array];
>
> test.m:11: warning: passing argument 1 of 'test:' from distinct 
> Objective-C type
>
> So this cryptic warning just means you got your ObjC pointer types 
> mixed up.
>
> Mike
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/
> <email_removed>
>
> This email sent to <email_removed>
>

Related mailsAuthorDate
mlNewbie error Graham Jun 1, 22:39
mlRe: Newbie error Andrei Tchijov Jun 1, 23:50
mlRe: Newbie error Shawn Erickson Jun 2, 00:11
mlRe: Newbie error Mike Abdullah Jun 2, 00:12
mlRe: Newbie error Joshua Pennington Jun 2, 00:35
mlRe: Re: Newbie error Graham Jun 2, 12:02
mlRe: Newbie error Lon Giese Jun 2, 13:41
mlRe: Newbie error Nir Soffer Jun 2, 14:19
mlRe: Newbie error Jerrod Fowkes Jun 2, 14:51
mlRe: Newbie error Michael Ash Jun 2, 17:42
mlRe: Newbie error Lon Giese Jun 2, 19:28
mlRe: Newbie error glenn andreas Jun 2, 20:22
mlRe: Newbie error Lon Giese Jun 2, 22:32
mlRe: Newbie error I. Savant Jun 2, 22:38