# HG changeset patch # User Stefan Vogel # Date 1515515941 -3600 # Node ID 1d540ba7a1d1f7ba391e863c394acf2df15128c7 # Parent f21b5b4936f4de5c7525bb4d64bed2b9891709f9 #REFACTORING by stefan class: FlyByHelp changed: #helpTextFromModel:view:at: #helpTextFromView:at: diff -r f21b5b4936f4 -r 1d540ba7a1d1 FlyByHelp.st --- 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'!