AutoloadMetaclass.st
author Claus Gittinger <cg@exept.de>
Tue, 28 Dec 1999 15:03:48 +0100
changeset 5150 d7f854b5ede8
parent 4577 c249aeceef0f
child 5271 63e66f4da9fe
permissions -rw-r--r--
keep track of changed classes (even if current project has no changeSet)

Metaclass subclass:#AutoloadMetaclass
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Kernel-Classes'
!

!AutoloadMetaclass class methodsFor:'documentation'!

documentation
"
    AutoloadMetaclass catches unhandled class methods, files in 
    the corresponding code when first used and resends the catched
    message to the now existing class.

    Autoload installs AutoloadMetaclass as its metaclass in #initialize. 

    [author:]
        Stefan Vogel

    [see also:]
        Autoload
"
! !

!AutoloadMetaclass methodsFor:'message catching'!

doesNotUnderstand:aMessage
    "caught a message; load the class and retry the message"

    |newClass|

    self ~~ AutoloadMetaclass ifTrue:[
        newClass := myClass autoload.
        newClass notNil ifTrue:[
            ^ aMessage sendTo:newClass class 
        ]
    ].
    ^ super doesNotUnderstand:aMessage


    "
     Autoload xxx

     VisualPart unload.
     VisualPart xxx

     VisualPart unload.
     VisualPart defaultFont
    "

    "Modified: / 3.8.1999 / 13:57:05 / stefan"
! !

!AutoloadMetaclass class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/AutoloadMetaclass.st,v 1.2 1999-08-05 13:22:40 cg Exp $'
! !