• 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: Split class implementation into separate files.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Split class implementation into separate files.


  • Subject: Re: Split class implementation into separate files.
  • From: Hiro Fujimoto <email@hidden>
  • Date: Tue, 2 Mar 2004 21:17:33 +0900

Hi, Manish,

You can imprementation of a class into plural files using category
as below.

in AClass.h --

@interface AClass : NSObject {
}

-(void) someMethod;
@end

in AClass.m --

@implementation AClass

-(void) someMethod {
// your code...
}
@end

in AnotherFile.h --

@interface AClass (Another)

-(void) anotherMethod ;

@end

in AnotherFile.m

@implementation AClass (Another)

-(void) anotherMethod {
// your another code...
}

@end
--


On 2004/03/02, at 20:27, Manish Pattath wrote:

Hi All,

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?

with rgds,
pmanish

------------------------------------------------------------------------ ---------
hiro FUJIMOTO - developer in Japan.
_______________________________________________
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.


References: 
 >Split class implementation into separate files. (From: Manish Pattath <email@hidden>)

  • Prev by Date: Re: CFPreferences & NSArray*
  • Next by Date: Enumerations in scriptSuite and scriptTerminology files
  • Previous by thread: Split class implementation into separate files.
  • Next by thread: Re: Split class implementation into separate files.
  • Index(es):
    • Date
    • Thread