Why can't I call my doSomething method?
- by Tattat
This is my DrawSomethingCmd:
#import "Command.h";
@interface DrawSomethingCmd : Command {
}
-(void)doSomething;
-(void)execute;
@end
and the DrawSomethingCmd.m's doSomething method is:
-(void)doSomething{
NSLog(@"did");
}
The Command.h:
#import <Foundation/Foundation.h>
@interface Command : NSObject {
}
-(void)execute;
And Command.m:
#import "Command.h"
@implementation Command
-(id)init{
return self;
}
-(void)execute{
}
@end
And I have a method like this:
DrawSomethingCmd *tempCmd = [[DrawSomethingCmd alloc] init];
[tempCmd doSomething];
But my console didn't show anything. What's going on?