--- a/ActiveHelp.st Tue Sep 17 01:28:04 2019 +0200
+++ b/ActiveHelp.st Tue Sep 17 01:28:20 2019 +0200
@@ -689,30 +689,31 @@
#helpTextFor:at: or #helpTextFor: message ends this search and the
returned string is returned."
- |text|
+ |text pntRel v superView|
text := self basicHelpTextFor:aView at:aDevicePointOrNil.
+ text notNil ifTrue:[^ text].
- "/ in case of embedded toggles, buttons, etc.
- "/ walk along the container hierarchy...
- text isNil ifTrue:[
- |pntRel v|
+ "/ I guess the following is already done in basicHelpTextFor:at:
+ ^ nil.
- pntRel := aDevicePointOrNil.
- v := aView.
- [text isNil and:[v superView notNil]] whileTrue:[
- pntRel notNil ifTrue:[
- pntRel := aView device translatePoint:pntRel fromView:v toView:(v superView).
- ].
- v := v superView.
- text := self basicHelpTextFor:v at:pntRel
- ].
- v superView isNil ifTrue:[
- Debugging ifTrue:['no superview provides helptext' infoPrintCR].
- ^ nil
- ].
- ].
- ^ text
+"/ "/ in case of embedded toggles, buttons, etc.
+"/ "/ walk along the container hierarchy...
+"/ pntRel := aDevicePointOrNil.
+"/ v := aView.
+"/ [(superView := v superView) notNil] whileTrue:[
+"/ pntRel notNil ifTrue:[
+"/ pntRel := aView device translatePoint:pntRel fromView:v toView:superView.
+"/ ].
+"/ v := superView.
+"/ text := self basicHelpTextFor:v at:pntRel.
+"/ text notNil ifTrue:[^ text].
+"/ ].
+"/
+"/ v superView isNil ifTrue:[
+"/ Debugging ifTrue:['no superview provides helptext' infoPrintCR].
+"/ ].
+"/ ^ nil
!
helpTextFromModel:aModelOrTopView view:aView at:aPointOrNil