discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possible bug: sending messages to Class objects


From: Stephen Brandon
Subject: Possible bug: sending messages to Class objects
Date: Sat, 12 May 2001 19:26:09 +0100

Hi,

Before I go and do a really deep investigation of this problem, I thought I'd 
throw it to the list
and see if anyone can point me in the right direction.

I'm working on the GNUstep port of the SndKit and MusicKit, of NeXTStep fame. 
Progress is going very
well on MacOS X...

Anyway, I am getting the following error when compiling on GNUstep:

parseScore.m: In function `tune':
parseScore.m:2825: warning: multiple declarations for method `transpose:'
/usr/GNUstep/System/Headers/AppKit/NSResponder.h:192: warning: using 
`-(void)transpose:(id)sender'
MKTuningSystem.h:190: warning: also found `-transpose:(double)semitones'
parseScore.m:2825: incompatible type for argument 3 of indirect function call

                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    Weird!!!

The lines in question are:
        Class aClass = [MKTuningSystem class];
        [aClass transpose:val];

(also tried [MKTuningSystem transpose:val]; but that fails in exactly the same 
way)

I am comfortable about the fact of a multiple declaration, but I am more 
concerned that it is
preventing me from accessing a Class method with the same signature.

MKTuningSystem has a class method: +transpose: (double)semitones as well as 
instance method the
same. If I change the name of the class method, and call the renamed version, 
then I don't get the
error, but I don't want to change our API.

Other info: the parseScore.m file is not actually an objective C class, and the 
error is inside a
function not a method.

More info: running on very latest CVS version of GNUstep, on Caldera OpenLinux 
1.3 with lots of
customisations, gcc --version gives egcs-2.91.66.

Can anyone shed any light on this? Is it likely to be a compiler error - if so, 
which version should
I upgrade to, and are there any tricks to doing so? Any other directions to 
search in?

Thanks,
Stephen Brandon
address@hidden

ps I am not on this list: please cc: any replies to me at the above address



reply via email to

[Prev in Thread] Current Thread [Next in Thread]