The Inbox: Morphic-jr.1623.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Morphic-jr.1623.mcz

commits-2
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-jr.1623.mcz

==================== Summary ====================

Name: Morphic-jr.1623
Author: jr
Time: 15 February 2020, 11:08:38.57568 pm
UUID: 395170d6-dc38-7046-97b5-dcb64cea46c9
Ancestors: Morphic-mt.1622

Fix occasional subscript error with balloon help for messages in filtered message lists

Either the hoverRow or its model index could be zero when the balloon was eventually displayed and after the hoverRow > 0 check.

=============== Diff against Morphic-mt.1622 ===============

Item was changed:
  ----- Method: PluggableListMorph>>balloonText (in category 'accessing') -----
  balloonText
  "Overridden to send selector to model and not self. Do not use #perform:orSendTo: because super does more than just the send.."
+ | hoverRow modelIndex |
-
  self getHelpSelector ifNotNil: [:selector |
+ ((self model respondsTo: selector) and: [(hoverRow := self hoverRow) > 0])
+ ifTrue: [ modelIndex := self modelIndexFor: hoverRow.
+ modelIndex = 0 "happens sometimes with list filtering"
+ ifTrue: [^ super balloonText].
+ ^ self model perform: selector with: modelIndex]].
- ((self model respondsTo: selector) and: [self hoverRow > 0]) ifTrue: [
- ^ self model perform: selector with: (self modelIndexFor: self hoverRow)]].
 
  ^ super balloonText!