Iām making a program in C4 that consists of three separate buttons that change both their shape when pressed. When I create a bunch of methods for each button like this:
@implementation MyButton
-(void)methodA {
C4Log(@"methodA");
[button1 ellipse:CGRectMake(centerPos.x - buttonWidth/2.0f, 80, buttonWidth, buttonHeight)];
}
-(void)methodB {
C4Log(@"methodB");
[button2 ellipse:CGRectMake(centerPos.x - buttonWidth/2.0f, centerPos.y - buttonHeight/2.0f, buttonWidth, buttonHeight)];
}
-(void)methodC{
C4Log(@"methodC");
[button3 ellipse:CGRectMake(centerPos.x - buttonWidth/2.0f, canvasHeight - 280, buttonWidth, buttonHeight)];
}
@end
...and then call for them in the canvas...
[button1 listenFor:@"touchesBegan" fromObject:button1 andRunMethod:@"methodA"];
[button2 listenFor:@"touchesBegan" fromObject:button2 andRunMethod:@"methodB"];
[button3 listenFor:@"touchesBegan" fromObject:button3 andRunMethod:@"methodC"];
...All I end up getting are a bunch of undeclared identifier errors. What am I doing wrong?