• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: run method from other method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: run method from other method
      • From: Shawn Erickson <email@hidden>
References: 
 >run method from other method (From: Michael Swan <email@hidden>)

  • Prev by Date: Re: Core Data
  • Next by Date: Re: run method from other method
  • Previous by thread: run method from other method
  • Next by thread: Re: run method from other method
  • Index(es):
    • Date
    • Thread