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: clean up code (sorry for being stupid)
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Re: clean up code (sorry for being stupid)
Subject
:
Re: clean up code (sorry for being stupid)
From:
email@hidden
(Farl)
Date: Wed, 22 Aug 2001 00:27:37 -0700
in the .h:
-(void)function1;
in the .m
-(void)function1
{
//code goes here
}
You call it like this:
[self function1];
try that.
searle
email@hidden wrote:
>
Hello,
>
>
I wrote a little program which currently use a single source file
>
(Controller.m) and it's header file (Controller.h)
>
>
Controller.m is using a single construct like (is it a class or method or
>
something?) This is wired to a button, of course.
>
>
@implementation
>
- (IBAction)click:(id) sender
>
{
>
... (about 500 lines of Objective-C)
>
}
>
@end
>
>
The program is running fine, howevever I'd like to clean up my code a little
>
to avoid redundancy. So I want to declare some functions with arguments and
>
return values. Unfortunately all my tries to declare a function here is
>
driving the preprocessor nuts... :-/ Is it possible to declare a function
>
inside the construct above? Or do I need to declare functions externally?
>
Could someone post a little snippet to show me the right syntax?
>
>
TIA,
>
Martin
>
_______________________________________________
>
cocoa-dev mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Follow-Ups
:
Re: clean up code (sorry for being stupid)
From:
Ondra Cada <email@hidden>
References:
>
clean up code (sorry for being stupid)
(From: "email@hidden" <email@hidden>)
Prev by Date:
clean up code (sorry for being stupid)
Next by Date:
Re: clean up code (sorry for being stupid)
Previous by thread:
clean up code (sorry for being stupid)
Next by thread:
Re: clean up code (sorry for being stupid)
Index(es):
Date
Thread