--- a/ListView.st Fri Sep 02 17:42:50 2016 +0100
+++ b/ListView.st Thu Sep 08 06:46:20 2016 +0200
@@ -635,13 +635,14 @@
tabs expanded.
This behavior is ok in 99.99% of all applications.
However, you may turn this off iff:
- - you are certain, that no tabs are in the passed in list
- - it is very expensive to process the list (for example, because the list
- is defined by a virtual array, which computes the lines dynamically, on
- the fly).
+ - you are certain, that no tabs are in the passed in list
+ - it is very expensive to process the list (for example, because the list
+ is defined by a virtual array, which computes the lines dynamically, on the fly).
One use where this flag should be turned off is in the hex-memory display,
which is able to simulate texts with millions of lines, but they are actually
- simulated by generating the presented lines dynamically, as they are displayed."
+ simulated by generating the presented lines dynamically, as they are displayed.
+ Notice, that to totally prevent scanning og the whole text, you may have to turn off
+ other flags, such as checkineEndConventionWhenUpdating"
^ expandTabsWhenUpdating
!
@@ -653,13 +654,14 @@
tabs expanded.
This behavior is ok in 99.99% of all applications.
However, you may turn this off iff:
- - you are certain, that no tabs are in the passed in list
- - it is very expensive to process the list (for example, because the list
- is defined by a virtual array, which computes the lines dynamically, on
- the fly).
+ - you are certain, that no tabs are in the passed in list
+ - it is very expensive to process the list (for example, because the list
+ is defined by a virtual array, which computes the lines dynamically, on the fly).
One use where this flag should be turned off is in the hex-memory display,
which is able to simulate texts with millions of lines, but they are actually
- simulated by generating the presented lines dynamically, as they are displayed."
+ simulated by generating the presented lines dynamically, as they are displayed.
+ Notice, that to totally prevent scanning og the whole text, you may have to turn off
+ other flags, such as checkineEndConventionWhenUpdating"
expandTabsWhenUpdating := aBoolean
!
--- a/TextView.st Fri Sep 02 17:42:50 2016 +0100
+++ b/TextView.st Thu Sep 08 06:46:20 2016 +0200
@@ -132,7 +132,9 @@
"
although textViews (and instances of subclasses) are mostly used
as components (in the fileBrowser, the browser, the launcher etc.),
- they may also be opened as a textEditor;
+ they may also be opened as a textEditor. Notice, that usually,
+ instances of one of my subclasses (EditTextView, TextCollector, Workspace)
+ are actually used.
open a (readonly) textView on some information text:
[exBegin]
@@ -178,8 +180,25 @@
EditTextView openOn:'Makefile'
[exEnd]
+
+ configuring the TextView to NOT expand tabs and scan for special lines
+ (to avoid reading all lines, when usig a virtualArray)
+ [exBegin]
+ |a m|
+
+ a := VirtualArray new
+ setSize:100000000;
+ generator:[:lNr | Transcript show:'called for '; showCR:lNr.
+ 'this is line: ',lNr printString ].
+ m := a asValue.
+ (ScrollableView forView:TextView new)
+ expandTabsWhenUpdating:false;
+ checkLineEndConventionWhenUpdating:false;
+ model:m;
+ open; inspect.
+ [exEnd]
+
"
-
! !
!TextView class methodsFor:'instance creation'!