diff -r 681af9f06019 -r 885bd39df8df WindowBuilder.st --- a/WindowBuilder.st Mon Jun 16 18:52:23 1997 +0200 +++ b/WindowBuilder.st Mon Jun 16 18:53:35 1997 +0200 @@ -12,7 +12,7 @@ Object subclass:#WindowBuilder instanceVariableNames:'window windowView application bindings visuals focusSequence - namedComponents componentCreationHook applicationClass + namedComponents helpKeys componentCreationHook applicationClass keyboardProcessor subCanvasSpecs' classVariableNames:'' poolDictionaries:'' @@ -155,12 +155,33 @@ ^ focusSequence ! -helpTextFor:aComponent - "activeHelp interface: return some help text for a component" +helpKeyFor:aComponent + |v key| + + helpKeys isNil ifTrue:[^ nil]. + v := aComponent. + [v notNil] whileTrue:[ + (key := helpKeys at:v ifAbsent:nil) notNil ifTrue:[ + ^ key + ]. + v := v superView + ]. ^ nil +! +helpKeyFor:aComponent put:aKey + aKey isNil ifTrue:[ + helpKeys isNil ifFalse:[ + helpKeys removeKey:aComponent ifAbsent:nil + ] + ] ifFalse:[ + helpKeys isNil ifTrue:[ + helpKeys := IdentityDictionary new + ]. + helpKeys at:aComponent put:aKey + ] ! @@ -688,5 +709,5 @@ !WindowBuilder class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.38 1997-06-16 09:41:35 ca Exp $' + ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.39 1997-06-16 16:53:35 ca Exp $' ! !