• 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: Newbie: cannot find method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: cannot find method


  • Subject: Re: Newbie: cannot find method
  • From: Matt Diephouse <email@hidden>
  • Date: Sat, 6 Nov 2004 15:13:56 -0500

On Sat, 6 Nov 2004 11:53:29 -0800, Jesse Abram <email@hidden> wrote:
> I have a method within a controller class, from which I try to call
> another method, declared within the same header file, and defined
> within the same code, using [self theOtherMethodName];
> I get a compiler error, saying that the method cannot be found. Here
> are some code fragments with added comments:
>
> //as they appear in the header file of the class:
> - (IBAction)JDAProcess:(id)sender;
> - (IBAction)JDAWriteOut:(id)sender;
>
> //in the code, the second method tries to call the first one using:
> [self JDAProcess];

That's because there is no JDAProcess method. There is a JDAProcess:
method though (note the colon). Objective-C treats these as two
different methods. Something like this should work:

  [self JDAProcess: self];

Good luck,

--
matt diephouse
http://matt.diephouse.com
 _______________________________________________
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

References: 
 >Newbie: cannot find method (From: Jesse Abram <email@hidden>)

  • Prev by Date: Re: Newbie: cannot find method
  • Next by Date: Re: removeFromSuperview crash - please help
  • Previous by thread: Re: Newbie: cannot find method
  • Next by thread: Re: Newbie: cannot find method
  • Index(es):
    • Date
    • Thread