On Sun, Apr 22, 2012 at 6:39 AM, Sean P. DeNigris <sean@clipperadams.com> wrote:

Sean P. DeNigris wrote
>
> I get notifications when MC is loading things

Strange... I only get the announcements when class-side instance variables
are added via MC...

It seems that the reason is that MCClassDefinition>>load creates the class
in two steps:
1. MCClassDefinition>>createClass takes care of all the instance side stuff,
and correctly notifies of a new class
2. Metaclass>>instanceVariableNames: adds the class-side instance variable
names to the class, which now already exists; so the notification is of a
changed class definition


hahahaa I think that's a good catch ;)

Probably the easiest yet not-so-beatiful solution is to do something like this:

load
��� �self createClass ifNotNil:
��� ��� [:class |
������
SystemChangeNotifier uniqueInstance doSilently: [
��� ��� class class instanceVariableNames: self classInstanceVariablesString.
��� ��� self hasComment ifTrue: [class classComment: comment stamp: commentStamp]]
]


:(


--
View this message in context: http://forum.world.st/System-announcements-and-MC-tp4577351p4577658.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.




--
Mariano
http://marianopeck.wordpress.com