# HG changeset patch # User Claus Gittinger # Date 1242235109 -7200 # Node ID 759b4b908fcbe99087ff6e36fc26c1d1faba62f9 # Parent 1f315c18f4da114e8bc8637c73154ab1368181dd allow master to provide an alternative help text diff -r 1f315c18f4da -r 759b4b908fcb UISpecificationTool.st --- a/UISpecificationTool.st Wed May 13 18:40:04 2009 +0200 +++ b/UISpecificationTool.st Wed May 13 19:18:29 2009 +0200 @@ -344,21 +344,44 @@ !UISpecificationTool methodsFor:'help'! +basicFlyByHelpTextForKey:aKey + "activeHelp interface: return some help text for a key. + Redefined to ask the current components Spec first." + + |helpText| + + "/ first, ask the master (a hook for expecco, to provide different help texts) + masterApplication notNil ifTrue:[ + helpText := masterApplication basicFlyByHelpTextForKey:aKey. + helpText notNil ifTrue:[^ helpText ]. + ]. + + "/ then, ask the spec + helpText := (specification helpSpec) at:aKey ifAbsent:nil. + helpText notNil ifTrue:[^ helpText ]. + + "/ finally, ask myself... + ^ super basicFlyByHelpTextForKey:aKey. +! + basicHelpTextForKey:aKey "activeHelp interface: return some help text for a key. Redefined to ask the current components Spec first." |helpText| - "/ first, ask the spec - helpText := (specification helpSpec) at:aKey ifAbsent:nil. -"/ DEBUG: helpText isNil ifTrue:[^ 'No help for key: ', aKey ]. + "/ first, ask the master (a hook for expecco, to provide different help texts) + masterApplication notNil ifTrue:[ + helpText := masterApplication basicHelpTextForKey:aKey. + helpText notNil ifTrue:[^ helpText ]. + ]. - helpText isNil ifTrue:[ - helpText := super basicHelpTextForKey:aKey. - ]. -"/ DEBUG: ^ aKey , ': ' , helpText - ^ helpText + "/ then, ask the spec + helpText := (specification helpSpec) at:aKey ifAbsent:nil. + helpText notNil ifTrue:[^ helpText ]. + + "/ finally, ask myself... + ^ super basicHelpTextForKey:aKey. ! ! !UISpecificationTool methodsFor:'initialization'!