advertisement

Article:
  The Objective-C Language
Subject:   + initialize
Date:   2001-05-04 10:14:46
From:   wheatis
This was fine article. Although you mentioned that the +alloc method is usually not implemented, using it as the example could be misleading to new Cocoa developers.


+ initialize would have been a good alternative method to use as a demonstration of class methods. It gets called when the class is first loaded into the run time, providing an opportunity to do any class level initialization that needs doing. While one rarely (you can probably say never) provides an implemention for +alloc in new Objective-C Cocoa class, there are usually more opportunities in the wild to give +initialize an implementation.


- wheatis


1 to 1 of 1
  1. + initialize compared to constructors in C++
    2001-05-05 22:28:14  gskluzacek [View]

    • + initialize and - init /not/ compared to constructors in C++
      2001-05-06 16:55:40  halliday [View]

      • Michael Beam photo + initialize and - init /not/ compared to constructors in C++
        2001-05-07 10:45:12  Michael Beam | O'Reilly Author [View]

        • + initialize and - init /not/ compared to constructors in C++
          2001-05-07 21:08:18  gskluzacek [View]

          • Michael Beam photo + initialize and - init /not/ compared to constructors in C++
            2001-05-08 12:27:34  Michael Beam | O'Reilly Author [View]

1 to 1 of 1