class: ListView
changed: #getListFromModel
ListView was doing an asStringCollection to the model's
value. This is BAD BAD BAD, as it breaks huge-contents
tuning via VirtualArrays. This IS required both for the
Telecom and maybe other applciations. It is definitely
used in the fileBrowser's hex dump.
This change back to the old code may break code which
has been developed in the meantime (with this bug active).
If you encounter any, please fix there - not by converting
here to an in-memory collection!
--- a/ListView.st Tue Sep 03 21:27:51 2013 +0200
+++ b/ListView.st Tue Sep 03 22:06:14 2013 +0200
@@ -2626,23 +2626,28 @@
|text msg|
model notNil ifTrue:[
- msg := listMsg ? aspectMsg.
-
- msg notNil ifTrue:[
- text := model perform:msg.
- text notNil ifTrue:[
- text := text asStringCollection.
- ].
- "/ SV: this compare does not work, if model uses (i.e. updates)
- "/ the same stringCollection as the view!!
-"/ text ~= list ifTrue:[
- scrollLocked == true ifTrue:[
- self setList:text
- ] ifFalse:[
- self list:text
- ]
-"/ ].
- ].
+ msg := listMsg ? aspectMsg.
+
+ msg notNil ifTrue:[
+ text := model perform:msg.
+ "/ cg: this makes many optimizations (virtualArray) useless;
+ "/ I do not think that this is a good idea!!
+ "/ text notNil ifTrue:[
+ "/ so I changed it to:
+ (text notNil and:[text isString]) ifTrue:[
+ text := text asStringCollection.
+ ].
+
+ "/ SV: this compare does not work, if model uses (i.e. updates)
+ "/ the same stringCollection as the view!!
+ true "text ~= list" ifTrue:[
+ scrollLocked == true ifTrue:[
+ self setList:text
+ ] ifFalse:[
+ self list:text
+ ]
+ ].
+ ].
].
"Modified: 26.4.1996 / 14:09:42 / cg"
@@ -4926,10 +4931,10 @@
!ListView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.377 2013-09-03 19:24:27 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.378 2013-09-03 20:06:14 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.377 2013-09-03 19:24:27 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.378 2013-09-03 20:06:14 cg Exp $'
! !