I am making a HilleGass Chapter 31 and all seems to be fine so far, but right now I stopped on the fact that an IBAction has method does not receive the event from the Button when the button is pressed
In the PolView.h file I have
then in the PolView.m file
I have connected the two Buttons into the visible actions in the PolView in the InterfaceBuilder one to createNew... and one to the deleteRan..., but I do not see any action been initiated when pressing the buttons.
I wonder if there is a possibility to see in the debugger what is going on ???
Thanks for a tip in advance..
/petron
In the PolView.h file I have
Code:
#import <Cocoa/Cocoa.h>
@interface PolynomView : NSView {
NSMutableArray *polynomials;
}
- (IBAction)createNewPolynom:(id)sender;
- (IBAction)deleteRandomPolynom:(id)sender;
@end
then in the PolView.m file
Code:
- (IBAction)createNewPolynom:(id)sender {
polynom *p = [[polynom alloc] init];
[polynomials addObject:p];
[self setNeedsDisplay:YES];
}
- (IBAction)deleteRandomPolynom:(id)sender {
if ([polynomials count] == 0) {
NSBeep();
return;
}
int i = random() % [polynomials count];
[polynomials removeObjectAtIndex:i];
[self setNeedsDisplay:YES];
}
I have connected the two Buttons into the visible actions in the PolView in the InterfaceBuilder one to createNew... and one to the deleteRan..., but I do not see any action been initiated when pressing the buttons.
I wonder if there is a possibility to see in the debugger what is going on ???
Thanks for a tip in advance..
/petron