Step by Step

These steps are to be done:

  1. Define a class:
    ::obj::new $classname
    
  2. Define constructor, destructor
    ::obj::constructor $classname $argl $body	
    ::obj::destructor $classname $body
    
  3. Define options
    ::obj::configure $classname $key $defaultval
    
  4. Define methods
    ::obj::method $classname $method $argl $body
    
  5. Define configuremethods
    ::obj::configuremethod $classname $key $val $body
    ::obj::validatemethod $classname $key $val $body
    ::obj::cgetmethod $classname $key $body
    
  6. Delegate methods
    ::obj::delegate method $method $component
    

    ... or ...

    ::obj::delegate method $method $component $compmethod
    
  7. Delegate options
    ::obj::delegate option $method $component
    

    ... or ...

    ::obj::delegate option $method $component $compoption
    
  8. Create an object
    set obj1 [::obj::new $classname]
    

    ... or ...

    set obj1 [$classname]
    
  9. Write the body of your script

No Software Patents

| Home | Sitemap | A-Z