"Change Set: CelesteMessageListFix-nk Date: 5 April 2001 Author: Ned Konz Apparently ChangeSet 3850 didn't take into account the PluggableMultiColumnListMorph, in which a binary search won't work to find the index of submorphs. So here's a version with a linear search instead. Not as fast, but at least Celeste doesn't blow up when you access messages by clicking in the message list."! !PluggableMultiColumnListMorph methodsFor: 'accessing' stamp: 'nk 4/5/2001 23:18'! itemFromPoint: aPoint "Return the list element (morph) at the given point or nil if outside" | ptY | scroller hasSubmorphs ifFalse:[^nil]. (scroller fullBounds containsPoint: aPoint) ifFalse:[^nil]. ptY _ (scroller firstSubmorph point: aPoint from: self) y. "note: following assumes that submorphs are vertical, non-overlapping, and ordered" scroller firstSubmorph top > ptY ifTrue:[^nil]. scroller lastSubmorph bottom < ptY ifTrue:[^nil]. "now use binary search" ^scroller submorphThat: [ :item | item top <= ptY and:[item bottom >= ptY] ] ifNone: []. ! !