Re: Sorry for another NEWBIE question
Re: Sorry for another NEWBIE question
- Subject: Re: Sorry for another NEWBIE question
- From: Cameron Hayne <email@hidden>
- Date: Wed, 19 Nov 2003 13:35:11 -0500
On 19/11/03 12:28 PM, "Michael Becker" <email@hidden> wrote:
>
As my application develops, my AppController class files grow bigger
>
and bigger. Usually I would try to divide the appropriate stuff up into
>
appropriate files, but it seems as though common standard in Cocoa is
>
to use the main controller file for anything.
One thing you can do is use categories to split things up into separate
files. E.g. something like this:
File myController.m:
@implementation myController
// [snip]
@end
File myTableStuff.m:
@implementation myController (myTableStuff)
// [snip]
@end
All methods you put into the category will be available as if they had been
in the main controller file.
I think the first place I saw this trick was in Michael Beam's O'Reilly
article on toolbars:
http://www.macdevcenter.com/pub/a/mac/2002/03/15/cocoa.html
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.