ActiveHelp.st
changeset 1549 1b5274878f87
parent 1543 95c5048dd99a
child 1591 4e75531ffacf
--- a/ActiveHelp.st	Wed Dec 12 11:39:19 2001 +0100
+++ b/ActiveHelp.st	Thu Dec 13 19:44:19 2001 +0100
@@ -394,16 +394,23 @@
      #helpTextFor:at: or #helpTextFor: message ends this search and the
      returned string is returned."
 
-    |model app1 app2 text view v sv|
+    |model app1 app2 text view v sv topView|
 
     view := aView.
 
-    (aView respondsTo:#application) ifTrue:[
-        (app1 := aView application) notNil ifTrue:[
-            text := self helpTextFromModel:app1 view:aView at:aPointOrNil.
+    ((aView respondsTo:#application)
+    and:[ (app1 := aView application) notNil ]) ifTrue:[
+        text := self helpTextFromModel:app1 view:aView at:aPointOrNil.
+        text notNil ifTrue:[ ^ text ].
+    ] ifFalse:[
+        "/ old style (i.e. StandardSystemView ...)
+        topView := aView topView.
+        (topView notNil and:[topView ~~ aView]) ifTrue:[
+            text := self helpTextFromModel:topView view:aView at:aPointOrNil.
             text notNil ifTrue:[ ^ text ].
         ]
     ].
+
     (model := aView model) notNil ifTrue:[
         model ~~ app1 ifTrue:[
             text := self helpTextFromModel:model view:aView at:aPointOrNil.
@@ -633,6 +640,6 @@
 !ActiveHelp class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.45 2001-12-08 01:25:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ActiveHelp.st,v 1.46 2001-12-13 18:44:19 cg Exp $'
 ! !
 ActiveHelp initialize!