[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 What is an Object
--------------------------------------------------------------------------------

  From the moment a human is borned, he start recognizing and classifing the
  world around. Our brain has the automatic mecanisms to organize our world
  into Classes.

  An Object is a collection of Data and has some typicall behaviors which
  distincts it from other kind of Objects.

  Object :   Data + Behaviors    -->    Data + Methods

  Data:      What the Object HAS.
  Behaviors: What the Object DOES.

  Example: What is a chair ? Even a child will tell us:

  A chair has  (DATA) :

                * four legs
                * a certain colour
                * some dimensions
                * some weight
                * a surface to sit on
                * etc...

  A chair Behaviors (METHODS) :

                * Can be builted
                * Can be moved from a place to another
                * Supports if someone sits on it
                * Can be destroyed
                * etc...


  In these behaviors we may distinct what the chair DOES and what can
  be DONE TO the chair:

         The chair does:     * Supports if someone sits on it

         Someone may destroy the chair  --> Something is done to the
         chair.

  The actions that get DONE TO an Object are EVENTS.

  Data:       What the Object HAS.
  Behaviors:  What the Object DOES.
  Events:     What is DONE to the Object.

  Now lets see how we take those concepts into the programming languages:

  What is a Window ?

      A Window is an Object that HAS:
         * Coordinates on the screen.
         * A caption
         * Some controls on its surface
         * A colour
         * etc...

      A Window DOES:
         * Resize
         * Iconize
         * Change its position
         * etc...

      Some EVENTS may happen to a Window:
         * The mouse Clicks on it
         * The user press a key
         * The Window gets resized
         * etc...

  How can we get from an Object a certain action ?

  Sending it a Message!

  oWindow:Message( params,... )

  A message has usually the same name of the Method which gets performed:

  oWindow:Refresh()    ---> Will execute ---> METHOD Refresh() CLASS TWindow


  ... more on our OBJECTS product manual ...

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