help texts
authorClaus Gittinger <cg@exept.de>
Fri, 20 Jan 2006 16:29:11 +0100
changeset 2087 69abec0dd510
parent 2086 d357dc59885a
child 2088 3113857c38a9
help texts
ApplicationModel.st
--- a/ApplicationModel.st	Fri Jan 20 16:27:53 2006 +0100
+++ b/ApplicationModel.st	Fri Jan 20 16:29:11 2006 +0100
@@ -1112,6 +1112,31 @@
 
 !ApplicationModel methodsFor:'binding access-help'!
 
+basicFlyByHelpTextForKey:aKey
+    "flyByHelp interface: return some short help text for a key
+     key is the symbol associated with some widget or menu item.
+     Return the original (english) text; needs to be translated as per language"
+
+    |helpText helpSpec resourceArgs|
+
+    helpSpec := self flyByHelpSpec.
+    helpSpec notNil ifTrue:[
+        helpText := helpSpec at:aKey ifAbsent:nil.
+    ].
+    helpText isNil ifTrue:[
+        masterApplication notNil ifTrue:[
+            helpText := masterApplication flyByHelpTextForKey:aKey
+        ]
+    ].
+
+    "/ new: allow for a collection (resource-key arg1 arg2...)
+    (helpText isCollection and:[helpText isString not]) ifTrue:[
+        resourceArgs := helpText copyFrom:2.
+        helpText := helpText first.
+    ].
+    ^ helpText
+!
+
 basicHelpTextForKey:aKey
     "activeHelp interface: return some help text for a key
      key is the symbol associated with some widget or menu item.
@@ -1159,21 +1184,7 @@
 
     |helpText helpSpec resourceArgs|
 
-    helpSpec := self flyByHelpSpec.
-    helpSpec notNil ifTrue:[
-        helpText := helpSpec at:aKey ifAbsent:nil.
-    ].
-    helpText isNil ifTrue:[
-        masterApplication notNil ifTrue:[
-            helpText := masterApplication flyByHelpTextForKey:aKey
-        ]
-    ].
-
-    "/ new: allow for a collection (resource-key arg1 arg2...)
-    (helpText isCollection and:[helpText isString not]) ifTrue:[
-        resourceArgs := helpText copyFrom:2.
-        helpText := helpText first.
-    ].
+    helpSpec := self basicFlyByHelpTextForKey:aKey.
 
     (resources notNil and:[helpText notNil]) ifTrue:[
         "/ translate.
@@ -2890,7 +2901,7 @@
 !ApplicationModel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.217 2006-01-20 15:27:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.218 2006-01-20 15:29:11 cg Exp $'
 ! !
 
 ApplicationModel initialize!