advertisement

Article:
  The Objective-C Language
Subject:   Definitions of Interface/Implementation, it is in error to say ObjC defines these in seperate files.
Date:   2001-07-04 19:36:15
From:   bigboytoddy
Well, just being the nitpick that I am, here is another error...


ObjC does NOT require that interface and implementation sections be in different files. That is an error, they can and are defined in different sections, which by PRACTICE are seperated into different files. ObjC again does not require this, as per the following


%cat SomeClass.m


#import <allTheCrapYouWant.h>


@interface SomeClass : NSObject
.. declare ivars
.. declare the methods
@end


@implementation SomeClass
.. define the actions to be taken by selector matched methods.
@end


Just hope that clears things up. There are times, all the time that an interface and implementation are included in ONE file, especially in OPENSOURCE projects where you are defining private classes that you DON"T want the interface to be well known, and in fact should NOT be known.


\t


1 to 1 of 1
  1. Definitions of Interface/Implementation, it is in error to say ObjC defines these in seperate files.
    2001-07-04 19:42:04  bigboytoddy [View]

    • Definitions of Interface/Implementation, it is in error to say ObjC defines these in seperate files.
      2001-07-04 19:45:55  bigboytoddy [View]

      • Returned Data types of methods
        2001-07-04 19:49:13  bigboytoddy [View]

        • IMHO the right way to do setter selector definitions
          2001-07-04 20:00:55  bigboytoddy [View]

          • Calling [super init] within your own initXXX methods
            2001-07-04 20:13:20  bigboytoddy [View]

1 to 1 of 1