[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Creating New Objects

  New objects are usually created by sending the new() message to a
  class object. For example, to create a new instance of a Window class, we
  use code such as the following:

    obj := Window():new( 5, 10, 15, 70 )

  This statement sends the new() message, with the specified parameters,
  to the Window class. The Window class responds by creating a new Window
  object, and initializing it by invoking the new method defined for the
  Window class. A reference to the newly created and initialized Window
  object is returned to the caller, and in this case the object reference is
  stored in the variable obj.

  For a more detailed discussion of object creation, see Instantiation.

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson