On 2006-04-27, at 19:43 EDT, P T Withington wrote:

> 8) Remove Class.isExtendedBy (not deprecated, but only used by  
> LzNode and can be incorporated into .make and .initialize)

Class.isExtendedBy is really what I would call a 'class  
initializer'.  It is a class method that is invoked each time a  
subclass of the class is created (including the class itself).

I propose changing the Class.make protocol to be:

Class.make = function(identifier, superclass, initValues, initFunction)

Where:

. identifier is a string naming the class
. superclass is null, a Class, or an array of traits and a class  
(null defaults the superclass to Instance, array is for traits, which  
are not yet implemented and may be presented differently at the LZX  
level).
. initValues is a hash (Object) listing the initial properties of the  
class (can include Function properties, which are methods).
. initFunction is either null or a function and is the class  
initializer.  The function will be invoked with `this` bound to the  
class it is the initializer for and a single argument that is the  
class prototype that it is initializing (which may be the prototype  
of the class or a subclass of the class).  It is run when the class  
is created or when any subclass of the class is created.  The class  
initializers run in order from least- to most-specific (i.e., the  
prototype is guaranteed to have been initialized by all superclasses  
before the class initializer is run).

I will send an example in a subsequent message.

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to