only send change message if indicator changes from false->true and
authorClaus Gittinger <cg@exept.de>
Mon, 28 Sep 1998 11:58:07 +0200
changeset 1154 41d487404200
parent 1153 2d8220e1c214
child 1155 ff5b146ca277
only send change message if indicator changes from false->true and vice versa (i.e. not if nil->false)
FileSelectionItem.st
--- a/FileSelectionItem.st	Mon Sep 28 11:28:28 1998 +0200
+++ b/FileSelectionItem.st	Mon Sep 28 11:58:07 1998 +0200
@@ -460,7 +460,11 @@
 !
 
 showIndicator
-    "returns true if the node is a not empty directory
+    "returns true if the node is a non-empty directory.
+     This information is gathered lazily: first, false is
+     returned and indicatorValidation is started for mySelf;
+     this will read directories in the background to avoid
+     long startup delays (of my treeView)
     "
     |model|
 
@@ -476,18 +480,22 @@
     ].
     ^ showIndicator
 
-    "Modified: / 24.9.1998 / 14:22:34 / cg"
+    "Modified: / 26.9.1998 / 15:17:53 / cg"
 !
 
 showIndicator:aBool
     "indication might change; raise a change notification
     "
-    self showIndicator ~~ aBool ifTrue:[
-        showIndicator := aBool.
+    |prev|
+
+    prev := showIndicator ? false.
+    showIndicator := aBool.
+    prev ~~ aBool ifTrue:[
+    "/ self showIndicator ~~ aBool ifTrue:[
         self changed:#indication
     ].
 
-
+    "Modified: / 28.9.1998 / 11:14:30 / cg"
 ! !
 
 !FileSelectionItem methodsFor:'repair mechanism'!
@@ -675,5 +683,5 @@
 !FileSelectionItem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/FileSelectionItem.st,v 1.14 1998-09-24 18:51:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/FileSelectionItem.st,v 1.15 1998-09-28 09:58:07 cg Exp $'
 ! !