FlyByHelp.st
changeset 2754 4c3b40eba71b
parent 2692 5fe75b7fb83a
child 2774 7894ba397774
equal deleted inserted replaced
2753:f8c6eadde7bb 2754:4c3b40eba71b
   129     |text|
   129     |text|
   130 
   130 
   131     aPointOrNil notNil ifTrue:[
   131     aPointOrNil notNil ifTrue:[
   132         (aModel respondsTo:#flyByHelpTextFor:at:) ifTrue:[
   132         (aModel respondsTo:#flyByHelpTextFor:at:) ifTrue:[
   133             text := aModel flyByHelpTextFor:aView at:aPointOrNil.
   133             text := aModel flyByHelpTextFor:aView at:aPointOrNil.
   134         ].
   134             text notNil ifTrue:[^ text].
   135     ].
   135         ].
   136     text isNil ifTrue:[
   136     ].
   137         (aModel respondsTo:#flyByHelpTextFor:) ifTrue:[
   137     (aModel respondsTo:#flyByHelpTextFor:) ifTrue:[
   138             text := aModel flyByHelpTextFor:aView.
   138         text := aModel flyByHelpTextFor:aView.
   139         ].
   139         text notNil ifTrue:[^ text].
   140     ].
   140     ].
   141     ^ text
   141     ^ nil
   142 !
   142 !
   143 
   143 
   144 helpTextFromView:aView at:aPointOrNil 
   144 helpTextFromView:aView at:aPointOrNil 
   145     "helper: ask aView for its helpText."
   145     "helper: ask aView for its helpText."
   146 
   146 
   147     |text|
   147     |text key app|
   148 
   148 
   149     aPointOrNil notNil ifTrue:[
   149     aPointOrNil notNil ifTrue:[
   150         (aView respondsTo:#flyByHelpTextAt:) ifTrue:[
   150         (aView respondsTo:#flyByHelpTextAt:) ifTrue:[
   151             text := aView flyByHelpTextAt:aPointOrNil.
   151             text := aView flyByHelpTextAt:aPointOrNil.
   152         ].
   152             text notNil ifTrue:[^ text].
   153     ].
   153         ].
   154     text isNil ifTrue:[
   154     ].
   155         (aView respondsTo:#flyByHelpText) ifTrue:[
   155     (aView respondsTo:#flyByHelpText) ifTrue:[
   156             text := aView flyByHelpText.
   156         text := aView flyByHelpText.
   157         ].
   157         text notNil ifTrue:[^ text].
   158     ].
   158     ].
   159     ^ text.
   159     (aView respondsTo:#helpKey) ifTrue:[
       
   160         key := aView helpKey.
       
   161         key notNil ifTrue:[
       
   162             app := aView application.
       
   163             app isNil ifTrue:[
       
   164                 app := Error handle:[:ex | nil] do:[ aView windowGroup mainGroup application ].
       
   165             ].
       
   166             app notNil ifTrue:[
       
   167                 ^ app flyByHelpTextForKey:key
       
   168             ].
       
   169             ^ aView resources string:key
       
   170         ].
       
   171     ].
       
   172     ^ nil.
   160 ! !
   173 ! !
   161 
   174 
   162 !FlyByHelp methodsFor:'private'!
   175 !FlyByHelp methodsFor:'private'!
   163 
   176 
   164 hideIfPointerLeft:aView
   177 hideIfPointerLeft:aView
   360 ! !
   373 ! !
   361 
   374 
   362 !FlyByHelp class methodsFor:'documentation'!
   375 !FlyByHelp class methodsFor:'documentation'!
   363 
   376 
   364 version
   377 version
   365     ^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.31 2009-07-09 12:59:47 cg Exp $'
   378     ^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.32 2009-10-01 07:53:07 cg Exp $'
       
   379 !
       
   380 
       
   381 version_CVS
       
   382     ^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.32 2009-10-01 07:53:07 cg Exp $'
   366 ! !
   383 ! !
   367 
   384 
   368 FlyByHelp initialize!
   385 FlyByHelp initialize!