Hi,

> The compiler doesn’t know which method you’re actually calling, and has no 
> way of disambiguating at compile time, so it has to assume that it is one or 
> the other;

There is no one or the other LTWGadgetZ is not part of the project and the .h 
and .m files for it have been deleted. It used to use LTWGadgetZ it nows uses 
LTWGadgetX.

When it worked without warning, it imported LTWGadgetZ.h, it now imports 
LTWGadgetZ.h. I’ve done a global search and removed all occurrences of 
LTWGadgetZ.h and I’ve cleaned the project and build folder yet it still thinks 
LTWGadgetZ exists! 

> in this case, it’s assuming that it’s LTWGadgetZ. (i.e. it’s not a matter of 
> it “remembering” old code, the selection is more or less arbitrary). In this 
> case, You have several options:

LTWGadgetZ doesn’t exist anywhere, it used to exist and its mentioning it, so 
I’d call that “remembering”…..

> - Cast (i.e. myGadgetX = (LTWGadgetX *)[myClass newGadgetInfo])
> - Change +newGadgetInfo to return id
> - Use “id” for myGadgetX’s type
> - Use a common superclass of LTWGadgetX and LTWGadgetZ for myGadgetX’s type
> - Make a protocol to which  LTWGadgetX and LTWGadgetZ both conform, that 
> declares the methods they have in common, and use “id<ThatProtocol>” for 
> myGadgetX’s type


I know how to fix it, the point is it shouldn’t be warning me because 
LTWGadgetZ does not exist except in XCode’s (and my) “memory”.

This problem was fixed when I did a restart so I’m guessing it was stored in a 
Cache File which wasn’t cleared correctly when LTWGadgetZ was deleted from the 
project and file system.

There used to be a “Clear Caches” option which used to fix problems like this, 
does anyone know if that command is hidden anywhere or which folder I have to 
zap in order to clear them?

Cheers
Dave


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (Xcode-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to