::xox
Class AutoLoadSuperClass

Heritage:
::xotcl::Object
Class AutoLoadSuperClass
superclass ::xotcl::Object,
Mixin class that automatically loads the package that
 contains the superclass if that package exists.  

 The package is determined by the full namespace name
 of the class.

 Example:

 Class:

 ::xounit::TestCase

 Package:

 xounit::TestCase

 This follows the standard naming conventions set by xotcllib. 
 This class also solves the problem of loading the superclasses
 before the subclasses.
Variables
NameDefault ValueClassComment
 
Methods
NameComment
superclass {superclasses}   Set the superclass for a class and load the superclass if it is not yet loaded
   
Methods from ::xotcl::Object
#, ., ?, ?code, ?methods, ?object, abstract, copy, coverageFilter, defaultmethod, extractConfigureArg, filterappend, garbageCollect, get#, getClean#, hasclass, init, methodTag, mixinappend, move, profileFilter, self, setParameterDefaults, shell, tclcmd, traceFilter,
 
Instproc Detail

superclass

Description:
 Set the superclass for a class and load the superclass if
 it is not yet loaded.
Arguments:
Code:
  ::xox::AutoLoadSuperClass instproc superclass {superclasses}  {
   

        foreach superclass $superclasses {

            if { ! [ uplevel ::xotcl::Object isclass $superclass ] } {

                set cleanClass [ ::xox::Package getClassPackage $superclass ]

                #my debug $cleanClass

                if [ ::xox::Package isPackage $cleanClass ] {

                    package require $cleanClass
                } 
            }
        }

        return [ next ]
    
}