[BUG] SystemChangeNotifier notifies twice the same event.

Boris Gaertner Boris.Gaertner at gmx.net
Mon Sep 6 16:05:06 UTC 2004


"Diego Gomez Deck" <DiegoGomezDeck at ConsultAr.com> wrote:


> To reproduce the bug do the following:
> 
> - Modify, for instance, ChangeSet>>event: to show in the Transcript the
> event. (The attached fileout does it).
> 
> - Open a Transcript.
> 
> - Modify any method.
> 
> You'll see twice the same event on Transcript.
I can confirm this for  Squeak 3.7 gamma latest update: #5987.
I did not check earlier versions.

> Any idea how to resolve it?
This is very very ugly!
In  Utilities class>>event:  we have:

InMidstOfFileinNotification signal
   ifFalse: [Utilities changed: #recentMethodSubmissions].

The 'InMidstOfFileinNotification signal' is expected to
tell you whether you are in a file in, where you want silence.

When the exception is signalled, you get the second event.
To verify this, you can replace 
   'InMidstOfFileinNotification signal' 
with
   false.
Than you have only one event notification.
Regrettably, this is not the fix, but only the identification
of the problem.

I think the problem is not in Utilities class>>event:
but in a too general exception handler that does not
pay special attention to the exception
InMidstOfFileInNotification 

Attached you find a proposed fix. Please have a look at the
preable of that change set.

Anyway, this use of an excpetion is very very questionable.

> Cheers,
Boris
> 
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MethodChangeNotification.1.cs
Type: application/octet-stream
Size: 1731 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040906/c9bc6d5c/MethodChangeNotification.1.obj


More information about the Squeak-dev mailing list