I want to return to a function after another completes, how do I do this?
int outer() {
int x = 0;
inner();
x = x + 1;
return x;
}
-(IBAction)run {
do stuff
reselect action
start (IBAction)doSomeThingElse
}
I think I may have asked the question wrong...or worded it wrong.
I have multiple IBActions, each can be called on its own, but after it is called it effects other IBActions. I want to have an IBAction call on another IBAction after it completes its execution.
Something like...
Code:-(IBAction)run { do stuff reselect action start (IBAction)doSomeThingElse }
-(IBAction)theFirstFunction:(id)sender{
[self theSecondFunction:self];
}
-(IBAction)theSecondFunction:(id)sender{
//Whatever
}
This will do it.
Code:-(IBAction)theFirstFunction:(id)sender{ [self theSecondFunction:self]; } -(IBAction)theSecondFunction:(id)sender{ //Whatever }
-(IBAction)theFirstFunction:(id)sender{
[self theSecondFunction:[B][COLOR="Red"]sender[/COLOR][/B]];
}
-(IBAction)theSecondFunction:(id)sender{
//Whatever
}
Will that do what the OP wants? Keep in mind that I'm pretty new to Cocoa/Obj-C, but would the following snippet be the proper way to chain to a second function, and if not, why not?
Code:-(IBAction)theFirstFunction:(id)sender{ [self theSecondFunction:[B][COLOR="Red"]sender[/COLOR][/B]]; } -(IBAction)theSecondFunction:(id)sender{ //Whatever }
[self theSecondFunction:[B][COLOR="Red"]sender[/COLOR][/B]]