#REFACTORING by stefan
class: FlyByHelp
changed:
#helpTextFromModel:view:at:
#helpTextFromView:at:
--- a/FlyByHelp.st Tue Jan 09 17:36:51 2018 +0100
+++ b/FlyByHelp.st Tue Jan 09 17:39:01 2018 +0100
@@ -172,17 +172,17 @@
|text|
- aPointOrNil notNil ifTrue:[
- (aModel respondsTo:#flyByHelpTextFor:at:) ifTrue:[
- text := aModel flyByHelpTextFor:aView at:aPointOrNil.
- text notNil ifTrue:[^ text].
- ].
+ (aPointOrNil notNil and:[aModel respondsTo:#flyByHelpTextFor:at:]) ifTrue:[
+ text := aModel flyByHelpTextFor:aView at:aPointOrNil.
+ text notNil ifTrue:[^ text].
].
(aModel respondsTo:#flyByHelpTextFor:) ifTrue:[
text := aModel flyByHelpTextFor:aView.
text notNil ifTrue:[^ text].
].
^ nil
+
+ "Modified: / 09-01-2018 / 17:35:26 / stefan"
!
helpTextFromView:aView at:aPointOrNil
@@ -190,11 +190,9 @@
|text key app|
- aPointOrNil notNil ifTrue:[
- (aView respondsTo:#flyByHelpTextAt:) ifTrue:[
- text := aView flyByHelpTextAt:aPointOrNil.
- text notNil ifTrue:[^ text].
- ].
+ (aPointOrNil notNil and:[aView respondsTo:#flyByHelpTextAt:]) ifTrue:[
+ text := aView flyByHelpTextAt:aPointOrNil.
+ text notNil ifTrue:[^ text].
].
(aView respondsTo:#flyByHelpText) ifTrue:[
text := aView flyByHelpText.
@@ -227,6 +225,8 @@
].
].
^ nil.
+
+ "Modified: / 09-01-2018 / 17:38:42 / stefan"
! !
!FlyByHelp methodsFor:'private'!