Re: run method from other method
Re: run method from other method
- Subject: Re: run method from other method
- From: Shawn Erickson <email@hidden>
- Date: Sat, 15 Jan 2005 13:56:26 -0800
On Jan 15, 2005, at 1:51 PM, Shawn Erickson wrote:
On Jan 15, 2005, at 1:28 PM, Michael Swan wrote:
a & b are fine but c is not working at all. Try the following since
the methods are "methodA:" and "methodB:" not "methodA", etc....
- (IBAction)methodC:(id)sender
{
// do both methods
[self methodA:nil];
[self methodB:nil];
}
...or the following if methodA: and methodB: do something based on the
sender...
- (IBAction)methodC:(id)sender
{
// do both methods
[self methodA:sender];
[self methodB:sender];
}
FYI you can setup multiple controls to target the same action and use
the sender reference you get to make a decision in your action method,
it may avoid having multiple methods that do almost the same thing.
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden