FROM : Matt Diephouse
DATE : Sat Nov 06 21:13:56 2004
On Sat, 6 Nov 2004 11:53:29 -0800, Jesse Abram <<email_removed>> 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
DATE : Sat Nov 06 21:13:56 2004
On Sat, 6 Nov 2004 11:53:29 -0800, Jesse Abram <<email_removed>> 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
| Related mails | Author | Date |
|---|---|---|
| Jesse Abram | Nov 6, 20:53 | |
| Mont Rothstein | Nov 6, 21:11 | |
| Matt Diephouse | Nov 6, 21:13 | |
| Olivier Lanctôt | Nov 6, 21:34 | |
| Jonathan Jackel | Nov 6, 23:59 |






Cocoa mail archive

