Creating a Class in a Temporary Environment
Posted by
Sean P. DeNigris on
May 12, 2015; 10:45am
URL: https://forum.world.st/Creating-a-Class-in-a-Temporary-Environment-tp4825963.html
I used to have
creatingAClassInATemporaryNamespace
| testingEnvironment morph |
testingEnvironment := SystemDictionary new.
ClassBuilder new
name: #AClassForTesting
inEnvironment: testingEnvironment
subclassOf: Object
type: Object typeOfClass
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'TemporaryTesting'.
How do I do this with Slots?
I tried:
creatingAClassInATemporaryNamespace
| testingEnvironment morph |
testingEnvironment := SystemDictionary new.
PharoClassInstaller make: [ :builder |
builder
superclass: Object;
name: #AClassForTesting;
environment: testingEnvironment;
category: 'TemporaryTesting' ].
but got "key #SystemOrganization not found in SystemDictionary".
Cheers,
Sean