nsbutton performClick not working -
i have nsbutton btnone , when user clicks on button, want simulate click on button btntwo. btntwo has action displays message when clicked.
- (ibaction)btnoneclicked:(id)sender { [btntwo performclick:self]; } - (ibaction)btntwoclicked:(id)sender { nslog(@"btntwo clicked"); }
when run program , click on btnone, performclick not seem simulate click on btntwo no message displayed.
i've tried overriding performclick() of btntwo in nsbutton subclass display message.
-(void)performclick:(id)sender { nslog(@"performclick"); }
this not happening. message not getting displayed.
what doing wrong?
thanks.
i know it's late answer, better late never, right? :)
add
[super performclick:sender]
at end of overridden performclick method.
why doesn't call action method in first place (without overriding performclick) thing can have many problems. buttons connected action methods?
Comments
Post a Comment