# HG changeset patch # User Claus Gittinger # Date 1431007641 -7200 # Node ID 4b58c1136d8504c02edd42ed2bed00bad6882a72 # Parent 1095f8fdf1670d687622899cc74ef40dd2b19e96 class: NoteBookView changed: #update:with:from: FIX race condition: if list of tabs changes due to an asynchronous change-notification from another process, while we are redrawing (i.e. fast changes triggered by a background process), ensure that the update is synchronized by pushing it onto my event queue. diff -r 1095f8fdf167 -r 4b58c1136d85 NoteBookView.st --- a/NoteBookView.st Wed May 06 15:05:19 2015 +0200 +++ b/NoteBookView.st Thu May 07 16:07:21 2015 +0200 @@ -11,6 +11,8 @@ " "{ Package: 'stx:libwidg2' }" +"{ NameSpace: Smalltalk }" + View subclass:#NoteBookView instanceVariableNames:'list listHolder foregroundColor backgroundColor selection enabled action useIndex direction numberOfLines selectConditionBlock @@ -1180,10 +1182,24 @@ changedObject == listHolder ifTrue:[ something == #at: ifTrue:[ "/ a single items label has changed - self tabAtIndex:aParameter put:(listHolder value at:aParameter). + (self windowGroup notNil and:[Processor activeProcess ~~ self windowGroup process]) ifTrue:[ + self sensor pushAction: + [ + self tabAtIndex:aParameter put:(listHolder value at:aParameter) + ] + ] ifFalse:[ + self tabAtIndex:aParameter put:(listHolder value at:aParameter). + ]. ^ self. ]. - self list:(listHolder value). + (self windowGroup notNil and:[Processor activeProcess ~~ self windowGroup process]) ifTrue:[ + self sensor pushAction: + [ + self list:(listHolder value) + ] + ] ifFalse:[ + self list:(listHolder value). + ]. ^ self ]. @@ -3783,10 +3799,10 @@ !NoteBookView class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg2/NoteBookView.st,v 1.190 2014-12-21 23:32:28 cg Exp $' + ^ '$Header: /cvs/stx/stx/libwidg2/NoteBookView.st,v 1.191 2015-05-07 14:07:21 cg Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libwidg2/NoteBookView.st,v 1.190 2014-12-21 23:32:28 cg Exp $' + ^ '$Header: /cvs/stx/stx/libwidg2/NoteBookView.st,v 1.191 2015-05-07 14:07:21 cg Exp $' ! !