On Thu, Apr 19, 2012 at 12:21 AM, Fernando Olivero
<fernando.olivero@usi.ch> wrote:
Hi Mariano, we should be able to �"silently" create temporal classes,
without notifying the system.
Have you tried something like this:
default := RPackage organizer.
[
� � � �default unregister.
� � � �SystemChangeNotifier uniqueInstance doSilently: [
� � � � � � � � Object subclass: #TemporalClassForFuel
� � � � � � � � � � � �instanceVariableNames: ''
� � � � � � � � � � � �classVariableNames: ''
� � � � � � � � � � � �poolDictionaries: ''
� � � � � � � � � � � �category: 'FuelTests'].
] ensure:[
� � � � �(Smalltalk globals classNamed: 'TemporalClassForFuel' )
removeFromSystem:false.
� � � � �default register].
Hi Fernando. Thanks, but it doesn't seem to work.
I put a halt in SystemChangeNotifier >> classAdded: aClass inCategory: aCategoryName
Then I modfified ClassFactoryForTestCase:
newSubclassOf: aClass instanceVariableNames: ivNamesString classVariableNames:� classVarsString category: category
��� | newClass default |
��� default := RPackage organizer.
��� [
��� ��� default unregister.
��� ��� SystemChangeNotifier uniqueInstance doSilently: [
��� ��� newClass := aClass
��� ��� ��� subclass: self newName
��� ��� ��� instanceVariableNames: ivNamesString
��� ��� ��� classVariableNames: classVarsString
��� ��� ��� poolDictionaries: ''
��� ��� ��� category: (self packageName, '-', category) asSymbol.
��� ��� ].
��� ] ensure:[
�������� default register].
��� self createdClasses add: newClass.
��� ^newClass
And when creating a class, it still halts on #classAdded: aClass inCategory: aCategoryName