FROM : Mont Rothstein
DATE : Sat Nov 06 21:11:08 2004
Typo. Your method name is JDAProcess: not JDAProcess (notice the colon
on the end). Thus, your call should be
[self JDAProcess: self];
Alternatively, since the :(id)sender is for UI access, a common thing
to do, if the sender is not actively used by the method, is for
JDAProcess: to be a wrapper around a version of the method without a
paramter. ex:
Add to header file:
- (void)JDAProcess;
Add to .m file:
- (IBAction)JDAProcess:(id)sender
{
[self JDAProcess];
}
- (void)JDAProcess
{
...
}
Of course, you may very well know this and it was only a type :-)
Another pair of eyes is a wondrous thing.
-Mont
On Nov 6, 2004, at 11:53 AM, Jesse Abram wrote:
> Hi everyone, this is my first post. I've been learning Cocoa for
> awhile, and I've started my first app that I intend to complete to a
> polished state. Introductions aside, my problem (which probably has a
> simple answer) is as follows:
> 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];
>
> Additional note, the methods are defined one after the other in the
> code, as they are in the header.
>
> So, any help with this would be appreciated, I am new to OOP in
> general. Thanks!
> Jesse Abram _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/
> <email_removed>
>
> This email sent to <email_removed>
DATE : Sat Nov 06 21:11:08 2004
Typo. Your method name is JDAProcess: not JDAProcess (notice the colon
on the end). Thus, your call should be
[self JDAProcess: self];
Alternatively, since the :(id)sender is for UI access, a common thing
to do, if the sender is not actively used by the method, is for
JDAProcess: to be a wrapper around a version of the method without a
paramter. ex:
Add to header file:
- (void)JDAProcess;
Add to .m file:
- (IBAction)JDAProcess:(id)sender
{
[self JDAProcess];
}
- (void)JDAProcess
{
...
}
Of course, you may very well know this and it was only a type :-)
Another pair of eyes is a wondrous thing.
-Mont
On Nov 6, 2004, at 11:53 AM, Jesse Abram wrote:
> Hi everyone, this is my first post. I've been learning Cocoa for
> awhile, and I've started my first app that I intend to complete to a
> polished state. Introductions aside, my problem (which probably has a
> simple answer) is as follows:
> 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];
>
> Additional note, the methods are defined one after the other in the
> code, as they are in the header.
>
> So, any help with this would be appreciated, I am new to OOP in
> general. Thanks!
> Jesse Abram _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/
> <email_removed>
>
> This email sent to <email_removed>
| 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

