Documentation
Getting Started
New Features
Component Guide
Programming
    Language Guide
    Language Ref.
       General Design
       Lexical Structure
       Expressions
       Objects
       Methods
       Classes
       heitml Tags
          ? Tag
          assign Tag
          defautoclose Tag
          break Tag
          callenv Tag
          dbdatabase Tag
          dbquery Tag
          dbupdate Tag
          def Tag
          defclass Tag
          defbody Tag
          defenv Tag
          defhtml Tag
          defwysiwyg Tag
          for Tag
          forin Tag
          forsep Tag
          if Tag
          elsif Tag
          else Tag
          include Tag
          includeonce Tag
          inherit Tag
          let Tag
          mail Tag
          return Tag
          shell Tag
          while Tag
          writefile Tag
          \ Tag
       heitml Functions
       Database Access
       Global Variables
       Form Fields
       Server Variables
       Sessions
       heitml Syntax
    Component Ref.
    Class Library
    User Components
    Tryout Form
    Tutorial
    heitml 1
User Guide
Registration
Frame
    

defclass Tag

Format: <defclass TagName >< inherit ClassName1, ... > heitml </defclass>

Purpose: The defclass tag defines a class. Note that most classes are defined using the def or defenv tags. defclass defines a class without defining a constructor method. This is useful in two cases

  • To define an abstract class, that is used only to inherit from. An abstract class does not have a constructor. Consequently no objects of that class can be created.
  • The newly defined class inherits the constructor according to the normal inheritance rules. This is useful in case an existing class should be extended or modified by inheriting it, without modifying the constructor.
Defclass defines a new class. The class inherits methods and constructors according to the normal inheritance rules. If the class inherited a constructor defined by a def tag, then the class acts as a class defined by a def tag. If the class inherited a constructor defined by a defenv tag, then the class acts as a class define by a defenv tag. If the class did not inherit any constructor, no objects of the class can be created. For a description of the inherit tag, see the inherit tag.

Please note, that the parameter list and any properties defined by defwysiwyg or defhtml belong to the constructor and are inherited together with the constructor.

See Also: def, defenv, inherit.

Example:

heitml input:
<defclass myButton><inherit iaButton>
  <def process x>
  <...>
  </def>
</defclass>

A sample environment definition is as illustrated above. It defines a class named myButton that works just as an iaButton but overrides the process with another method to be performed.


This page was dynamically generated by heitml
© 1996-2009 H.E.I. All Rights Reserved