# HG changeset patch # User Claus Gittinger # Date 1350558618 -7200 # Node ID a4f4d63953b33503f0495837e86199446223719b # Parent 7f305ee14e9862a09e456796c2decaa23041c8db changed: #loadFromClass: care for helpPairs (not a dictionary) diff -r 7f305ee14e98 -r a4f4d63953b3 UIHelpTool.st --- a/UIHelpTool.st Tue Oct 16 09:09:12 2012 +0200 +++ b/UIHelpTool.st Thu Oct 18 13:10:18 2012 +0200 @@ -736,11 +736,22 @@ ]. value notNil ifTrue:[ - value keysAndValuesDo:[:k :v| |cval| - cval := lastContents at:k ifAbsent:self. - cval = v ifFalse:[ root add:(KeyItem helpKey:k helpText:v) ]. + (value isKindOf:Dictionary) ifTrue:[ + value keysAndValuesDo:[:k :v| |cval| + cval := lastContents at:k ifAbsent:self. + cval = v ifFalse:[ root add:(KeyItem helpKey:k helpText:v) ]. + ]. + lastContents := value. + ] ifFalse:[ + |dict| + dict := Dictionary new. + value pairWiseDo:[:k :v| |cval| + cval := lastContents at:k ifAbsent:self. + cval = v ifFalse:[ root add:(KeyItem helpKey:k helpText:v) ]. + dict at:k put:v. + ]. + lastContents := dict. ]. - lastContents := value. ]. root sort:[:a :b| a label < b label ]. root modified:false.