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:51:11 -0800
On Jan 15, 2005, at 1:28 PM, Michael Swan wrote:
I am teaching myself, or trying anyway, Cocoa with Obj-C. I follow a
few examples and then try to make something on my own. I have gotten
stuck on my latest project. It has 3 buttons (a, b, & c) and a
different method for each. a does one set of tasks, b a second, and c
does both methods, (... or should anyway). a & b are fine but c is not
working at all. I'm sure its something simple but I don't even know
what to put into the search field (self returns no documents). Below
is a copy of methodC, if anyone has any ideas I'd be grateful to hear
them.
- (IBAction)methodC:(id)sender
{
// do both methods
[self methodA];
[self methodB];
}
- (IBAction)methodA:(id)sender
{
//do some stuff
}
- (IBAction)methodB:(id)sender
{
do some different stuff
}
You see any compiler warnings (always listen to compiiler warnings...)?
Like methodA and methodB may not be supported?
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];
}
_______________________________________________
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