170 helpTextFromModel:aModel view:aView at:aPointOrNil |
170 helpTextFromModel:aModel view:aView at:aPointOrNil |
171 "helper: ask aModel for its helpText." |
171 "helper: ask aModel for its helpText." |
172 |
172 |
173 |text| |
173 |text| |
174 |
174 |
175 (aPointOrNil notNil and:[aModel respondsTo:#flyByHelpTextFor:at:]) ifTrue:[ |
175 (aPointOrNil notNil and:[aModel respondsTo:#helpTextFor:at:]) ifTrue:[ |
176 text := aModel flyByHelpTextFor:aView at:aPointOrNil. |
176 text := aModel helpTextFor:aView at:aPointOrNil. |
177 text notNil ifTrue:[^ text]. |
177 text notNil ifTrue:[^ text]. |
178 ]. |
178 ]. |
179 (aModel respondsTo:#flyByHelpTextFor:) ifTrue:[ |
179 (aModel respondsTo:#helpTextFor:) ifTrue:[ |
180 text := aModel flyByHelpTextFor:aView. |
180 text := aModel helpTextFor:aView. |
181 text notNil ifTrue:[^ text]. |
181 text notNil ifTrue:[^ text]. |
182 ]. |
182 ]. |
183 ^ nil |
183 ^ nil |
184 |
184 |
185 "Modified: / 09-01-2018 / 17:35:26 / stefan" |
185 "Modified: / 09-01-2018 / 17:35:26 / stefan" |
188 helpTextFromView:aView at:aPointOrNil |
188 helpTextFromView:aView at:aPointOrNil |
189 "helper: ask aView for its helpText." |
189 "helper: ask aView for its helpText." |
190 |
190 |
191 |text key app| |
191 |text key app| |
192 |
192 |
193 (aPointOrNil notNil and:[aView respondsTo:#flyByHelpTextAt:]) ifTrue:[ |
193 (aPointOrNil notNil and:[aView respondsTo:#helpTextAt:]) ifTrue:[ |
194 text := aView flyByHelpTextAt:aPointOrNil. |
194 text := aView helpTextAt:aPointOrNil. |
195 text notNil ifTrue:[^ text]. |
195 text notNil ifTrue:[^ text]. |
196 ]. |
196 ]. |
197 (aView respondsTo:#flyByHelpText) ifTrue:[ |
197 (aView respondsTo:#helpText) ifTrue:[ |
198 text := aView flyByHelpText. |
198 text := aView helpText. |
199 text notNil ifTrue:[^ text]. |
199 text notNil ifTrue:[^ text]. |
200 ]. |
200 ]. |
201 "/ to be enabled in next release... |
201 "/ to be enabled in next release... |
202 "/ (aView superView notNil |
202 "/ (aView superView notNil |
203 "/ and:[aView superView respondsTo:#flyByHelpTextFor:]) ifTrue:[ |
203 "/ and:[aView superView respondsTo:#helpTextFor:]) ifTrue:[ |
204 "/ text := aView superView flyByHelpTextFor:aView. |
204 "/ text := aView superView helpTextFor:aView. |
205 "/ text notNil ifTrue:[^ text]. |
205 "/ text notNil ifTrue:[^ text]. |
206 "/ ]. |
206 "/ ]. |
207 (aView respondsTo:#helpKey) ifTrue:[ |
207 (aView respondsTo:#helpKey) ifTrue:[ |
208 key := aView helpKey. |
208 key := aView helpKey. |
209 key notNil ifTrue:[ |
209 key notNil ifTrue:[ |
210 app := aView application. |
210 app := aView application. |
211 app isNil ifTrue:[ |
211 app isNil ifTrue:[ |
212 "/ special case for oldStyle Dialog subclasses. |
212 "/ special case for oldStyle Dialog subclasses. |
213 aView topView flyByHelpSpec notNil ifTrue:[ |
213 aView topView helpSpec notNil ifTrue:[ |
214 text := aView topView flyByHelpSpec at:key ifAbsent:nil. |
214 text := aView topView helpSpec at:key ifAbsent:nil. |
215 text notNil ifTrue:[ |
215 text notNil ifTrue:[ |
216 ^ aView topView resources stringWithCRs:text. |
216 ^ aView topView resources stringWithCRs:text. |
217 ]. |
217 ]. |
218 ]. |
218 ]. |
219 app := Error handle:[:ex | nil] do:[ aView windowGroup mainGroup application ]. |
219 app := Error handle:[:ex | nil] do:[ aView windowGroup mainGroup application ]. |
220 ]. |
220 ]. |
221 app notNil ifTrue:[ |
221 app notNil ifTrue:[ |
222 ^ app flyByHelpTextForKey:key |
222 ^ app helpTextForKey:key |
223 ]. |
223 ]. |
224 ^ aView resources string:key |
224 ^ aView resources string:key |
225 ]. |
225 ]. |
226 ]. |
226 ]. |
227 ^ nil. |
227 ^ nil. |