Re: Split class implementation into separate files.
Re: Split class implementation into separate files.
- Subject: Re: Split class implementation into separate files.
- From: Patrick Machielse <email@hidden>
- Date: Tue, 02 Mar 2004 17:08:44 +0100
op 02-03-2004 13:35 schreef pmanish
>
I am creating a Cocoa Application. I want to move the
>
toolbar implementation for this application into a
>
separate file but class should the same in both the
>
files.
>
Is it possible in Cocoa to split implementation of a
>
class into separate file?
Yes. As others have indicated you can use Categories for this.
MyWindow.m
----------
@implementation MyWindow
...
@end
MyWindow+Toolbar.m (I believe this is the name convention)
------------------
@implementation MyWindow ( ToolbarProtocol )
...
@end
Be aware that you can only split of implementation. If you need extra ivars
for your toolbar code, you need to add them to MyWindow.h.
Patrick,
--
Hieper Software
w: www.hieper.nl
e: email@hidden
_______________________________________________
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.