2014-01-27 Martin Dias <tinchodias@gmail.com>
On Mon, Jan 27, 2014 at 7:10 AM, Tudor Girba <tudor@tudorgirba.com> wrote:
I opened an issue: https://pharo.fogbugz.com/f/cases/12731/Traits-modifications-cause-a-DNU
I marked it as a show stopper because right now you cannot load a package with Traits in the image.
I am not sure about triggering the event for subclasses, but I can certainly understand that it can be useful for tools. However, the problem is that we are trying to figure out isPropagation after we trigger it, instead of doing it while triggering for a subclass. So, one possibility would be to distinguish between ClassModified and SuperclassModified. I tried to search in the code quickly but could not locate the exact place. I will try again later if nobody beats me to it.
+1 I think not much people is interested in SuperclassModified. ClassModified is the more interesting one. It requires, for example, the browser to be refreshed, the package to be marked as dirty, or the change to be logged. But SuperclassModified... ?
So, what to do? - Don't send ClassModifiedClassDefinition in SystemAnnouncer>>traitDefinitionChangedFrom: oldTrait to: newTrait ? - Implement Trait>>layout ? - Test for oldClassDefinition isTrait in ClassModifiedClassDefinition>>isPropagating ? Nicolai