0
votes

I have been scratching my head on this one for some time now and was hoping an extra pair of eyes would help: I am getting a "Cannot find interface declaration for 'AbstractPickerView', superclass of 'AttackLayer'. Trouble is i have imported all the necessary header files and the only thing i can think of is the multiple level inheritance

here are the interfaces:

@interface AttackLayer   : AbstractPickerView    <<< this is the one which gets the error
@interface AbstractPickerView: AbstractLayer <UIPickerViewDelegate>
@interface AbstractLayer : CCLayer

can anyone see what is wrong over here?

#import <Foundation/Foundation.h>   
#import "AbstractPickerView.h"    


@interface AttackLayer   : AbstractPickerView 

{
    CCMenu *buyPowerButton;

    CCMenu *finishBuyPower;

    id playerUI;

}

-(id) init:(PlayerController *)playerControl withObject:(id)object;

-(void)spendAttack:(id)sender;

-(void)spendResist:(id)sender;

-(void)transferPower:(id)sender;

-(void)timeOut;

-(void)commenceAttack:(id)sender;

-(void)appear;

-(void)buyPower:(id)sender;

-(void)reloadButtons;

-(void)buyPowerButtons;

-(void)cleanUpPicker:(id)sender;

@property(nonatomic,retain)id playerUI;

@property(nonatomic,retain) CCMenu *button2;

@property(nonatomic,retain) CCMenu *button3;

@property(nonatomic,retain) CCMenu *buyPowerButton;

@property(nonatomic,retain) CCMenu *finishBuyPower;

@property(nonatomic,retain)CCMenu *starMenu;


@end
1
Could you please post your entire AttackLayer interface (AttackLayer.h) - TeaCupApp
I'm guessing it's a circular include. Please post "AbstractPickerView.h". - joerick
solved the problem, i can't believe i pondered over it for so many hours, i replaced the header includes in the interface with @class and the imports in the .m AbstractPickerView.h and that fixed the problem - godzilla
Lol m late but my guess was correct, if u do @class u dont get everything from that header...it just let compiler knows that there is something like this but to get access to variables and methods we need to import that header ;) - TeaCupApp
you would not believe how long i spent pondering on this one LOL i was going mad :) - thanks dude - godzilla

1 Answers

5
votes

solved the problem, i can't believe i pondered over it for so many hours, i replaced the header imports in the interface with @class,moved the imports in the AbstractPickerView.m and that fixed the problem