class: HierarchicalList
changed: #root:
use contents: instead of removeAll/addAll:
--- a/HierarchicalList.st Tue Nov 18 15:34:38 2014 +0100
+++ b/HierarchicalList.st Wed Nov 19 22:46:22 2014 +0100
@@ -176,24 +176,27 @@
root:aRoot
"set the root item
"
- |children monitoring|
+ |children|
self stopMonitoringTask.
root notNil ifTrue:[
root parent:nil.
root := nil.
- super removeAll.
].
- (root := aRoot) notEmptyOrNil ifTrue:[
+ (root := aRoot) isEmptyOrNil ifTrue:[
+ self removeAll.
+ ] ifFalse:[
self showRoot ifFalse:[root expand].
root parent:self.
children := OrderedCollection new.
self showRoot ifTrue:[children add:root].
root addVisibleChildrenTo:children.
- super addAll:children beforeIndex:1
+ "/ self removeAll.
+ "/ self addAll:children beforeIndex:1.
+ self contents:children.
].
self startMonitoringTask.
@@ -384,9 +387,10 @@
!HierarchicalList class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalList.st,v 1.25 2009-11-05 17:56:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalList.st,v 1.26 2014-11-19 21:46:22 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalList.st,v 1.25 2009-11-05 17:56:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalList.st,v 1.26 2014-11-19 21:46:22 cg Exp $'
! !
+