#REFACTORING by cg
class: HierarchicalItem::Example
changed: #children (send #label:icon: instead of #labeled:icon:, send #label: instead of #labeled:)
class: HierarchicalItem::Example class
added:
#label:
#label:icon:
changed:
#labeled:
#labeled:icon:
--- a/HierarchicalItem.st Sat May 02 13:15:17 2020 +0200
+++ b/HierarchicalItem.st Sat May 02 19:50:29 2020 +0200
@@ -154,13 +154,27 @@
!HierarchicalItem::Example class methodsFor:'instance creation'!
+label:aLabel
+ ^ self new setLabel:aLabel
+
+ "Created: / 02-05-2020 / 19:45:54 / cg"
+!
+
+label:aLabel icon:anIcon
+ ^ self new setLabel:aLabel icon:anIcon
+
+ "Created: / 02-05-2020 / 19:45:42 / cg"
+!
+
labeled:aLabel
+ <resource: #obsolete>
^ self new setLabel:aLabel
!
labeled:aLabel icon:anIcon
+ <resource: #obsolete>
^ self new setLabel:aLabel icon:anIcon
@@ -217,7 +231,7 @@
lbl := txt, (i printString), ']'
]
].
- children add:(self class labeled:lbl icon:icon)
+ children add:(self class label:lbl icon:icon)
].
] ifFalse:[
image := ResourceSelectionBrowser iconPrivateClass.
@@ -227,15 +241,15 @@
1 to:5 do:[:i|
lbl := i odd ifTrue:[txt] ifFalse:[img].
lbl := Array with:lbl with:'test' with:img.
- children add:(self class labeled:lbl icon:icon).
+ children add:(self class label:lbl icon:icon).
].
- children add:(self class labeled:'Edit Text').
+ children add:(self class label:'Edit Text').
].
children do:[:aChild| aChild parent:self ].
^ children
- "Modified: / 14-07-2017 / 10:21:00 / cg"
+ "Modified: / 02-05-2020 / 19:46:10 / cg"
!
icon