Hi.
My idea was to ask concrete metaobject for new object definition:
Class <<< #MyClass
superclass: #Object;
uses: #MyTrait;
vars: { #a. #b };
classVars: { #A. #B };
package: #MyPackage;
tags: #(Core);
layout: #MethodDictionaryLayout.
for class side:
Metaclass <<< #MyClass
vars: { }.
Or:
Class classSide <<< #MyClass
for trait:
Trait <<< #MyTrait
uses: #AnotherTrait;
package: #MyPackage;
tags: #(Core Traits)
for trait class side:
ClassTrait <<< #MyTrait
uses: #AnotherClassSideTrait
2017-05-22 9:25 GMT+02:00 Luc Fabresse <[email protected]>:
> "basic mechanics, only THIS one in the image!"
> ClassDefinition new
> superclass: Object; "optional. If not specified, Object by default ;-)"
> name: #A; "optional and create an anonymous class if not specified"
> instVars: 'a b c';
> traits: {TEquality};
> package: 'Plop';
> createClass. " this message sent might be hidden by the browser when
> accepting"
>
I would not call it #createClass but something like #install. Because
#createClass can be also interesting message to get new class without
affecting live system.
And #install should be default version of #installInto: anEnvironment.