Read Me - Common Public License V1.0 - Copyright Notice(©)

mixinClass


>>-mixinClass(classid-+-------------------------+-)------------><
                      +-,metaclass-+----------+-+
                                   +-,methods-+

Returns a new mixin subclass of the receiver class. You can use this method to create a new mixin class that is a subclass of the superclass to which you send the message. The [classid] is a string that identifies the new mixin subclass. You can use the [id] method to retrieve this string.

The [metaclass] is a class object. If you specify [metaclass] , the new subclass is an instance of [metaclass] . (A metaclass is a class that you can use to create a class, that is, a class whose instances are classes. The Class class and its subclasses are metaclasses.)

If you do not specify a [metaclass] , the new mixin subclass is an instance of the default metaclass of the receiver class. For subclasses of the Object class, the default metaclass is the Class class.

The [methods] is a collection whose indexes are the names of methods and whose items are method objects (or strings or arrays of strings containing method code). If you specify [methods] , the new class is enhanced with class methods from this collection. (The metaclass of the new class is not affected.)

The [metaClass] method returns the metaclass of a class.

The method search order of the new subclass is the same as that of the receiver class, with the addition of the new subclass at the start of the order.

Class class - mixinClass method

buyable=.object~mixinClass("Buyable")  /* New subclass is buyable    */
                                       /* Superclass is Object class */

Read Me - Common Public License V1.0 - Copyright Notice(©)