The Trunk: ST80-nice.266.mcz

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

The Trunk: ST80-nice.266.mcz

commits-2
Nicolas Cellier uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-nice.266.mcz

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

Name: ST80-nice.266
Author: nice
Time: 13 April 2021, 4:43:13.39042 pm
UUID: 0986578e-d295-ce49-9499-d1d9a36429e7
Ancestors: ST80-nice.265

Prefer isSymbol to isKindOf: Symbol

=============== Diff against ST80-nice.265 ===============

Item was changed:
  ----- Method: PluggableListView>>verifyContents (in category 'updating') -----
  verifyContents
  | newItems existingSelection anIndex |
  "Called on window reactivation to react to possible structural changes.  Update contents if necessary."
 
  newItems := self getList.
  ((items == newItems) "fastest" or: [items = newItems]) ifTrue: [^ self].
  self flash.  "list has changed beneath us; could get annoying, but hell"
  existingSelection := list stringAtLineNumber: (selection + (topDelimiter ifNil: [0] ifNotNil: [1])).  "account for cursed ------ row"
  self list: newItems.
 
+ (newItems size > 0 and: [newItems first isSymbol]) ifTrue:
- (newItems size > 0 and: [newItems first isKindOf: Symbol]) ifTrue:
  [existingSelection := existingSelection asSymbol].
  (anIndex := newItems indexOf: existingSelection ifAbsent: [nil])
  ifNotNil:
  [model noteSelectionIndex: anIndex for: getListSelector.]
  ifNil:
  [self changeModelSelection: 0].
  selection := 0. " to display the list without selection "
  self displayView.
  self update: getSelectionSelector.
  !