Method Annotations

Avi Bryant avi at beta4.com
Sat Aug 23 19:36:02 UTC 2003


On Sat, 23 Aug 2003, Michael Rueger wrote:

> I found an excellent example of how this can break your system:
>
> Morph class>>
> noteCompilationOf: aSelector meta: isMeta
> 	"Any change to an additionsToViewer... method can invalidate existing
> etoy vocabularies"
>
> 	(isMeta and: [aSelector beginsWith: 'additionsToViewer']) ifTrue:
> 		[Vocabulary changeMadeToViewerAdditions]
>
>
> *While* it is fileing in code this "sort-of-annotation" mechanism does
> somthing that reinitializes another, totally unrelated part of the
> system. Which, not surprisingly, doesn't work unless you carefully
> hand-order the methods in your filein. Hoping of course, that there is a
>   filein order that will work.

Well, the problem here isn't with the annotation but with the notification
- any notifications about added methods and so on really should be wrapped
in a check using InMidstOfFileInNotification.  Ideally, the notifications
should be batched and all sent once the fileIn is complete (Roel, does
your system handle this case at all?).



More information about the Squeak-dev mailing list