--- a/Tools__ToDoList.st Mon Oct 23 21:43:12 2006 +0200
+++ b/Tools__ToDoList.st Mon Oct 23 22:40:44 2006 +0200
@@ -3,7 +3,7 @@
"{ NameSpace: Tools }"
List subclass:#ToDoList
- instanceVariableNames:''
+ instanceVariableNames:'validationPending validationProcess validationInvalid'
classVariableNames:'TheOneAndOnlyToDoList WarningSeverity ErrorSeverity InfoSeverity'
poolDictionaries:''
category:'Interface-Smalltalk-ToDo'
@@ -96,11 +96,47 @@
!ToDoList methodsFor:'change & update'!
revalidate
- self copy do:[:entry |
- entry revalidate
- ].
+ |wasPending|
+
+ [
+ wasPending := validationPending ? false.
+ validationPending := true.
+ wasPending ifTrue:[
+ validationInvalid := true
+ ].
+ ] valueUninterruptably.
+ wasPending ifTrue:[^ self].
+
+ validationProcess :=
+ [
+ [
+ |index entry|
+
+ validationInvalid := false.
+ index := 1.
+ [index <= self size] whileTrue:[
+ entry := self at:index.
+ entry revalidate.
+ index <= self size ifTrue:[
+ (self at:index) == entry ifTrue:[
+ "/ it did not remove itself
+ index := index + 1
+ ].
+ ].
+ validationInvalid ifTrue:[
+ validationInvalid := false.
+ index := 1.
+ ].
+ ].
+ ] ensure:[
+ validationPending := false.
+ validationProcess := nil.
+ validationInvalid := false.
+ ].
+ ] fork.
"Created: / 21-10-2006 / 23:02:34 / cg"
+ "Modified: / 23-10-2006 / 22:40:11 / cg"
!
update:something with:aParameter from:changedObject
@@ -112,12 +148,13 @@
^ super update:something with:aParameter from:changedObject
"Created: / 21-10-2006 / 23:02:05 / cg"
+ "Modified: / 23-10-2006 / 22:20:52 / cg"
! !
!ToDoList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__ToDoList.st,v 1.1 2006-10-23 08:57:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__ToDoList.st,v 1.2 2006-10-23 20:40:44 cg Exp $'
! !
ToDoList initialize!