ListView.st
changeset 1101 a38f49637175
parent 1099 eccab3759ddb
child 1178 c221e0f8cbb6
equal deleted inserted replaced
1100:2256f369ee96 1101:a38f49637175
   794     (aCollection isNil and:[list isNil]) ifTrue:[
   794     (aCollection isNil and:[list isNil]) ifTrue:[
   795         "no change"
   795         "no change"
   796         ^ self
   796         ^ self
   797     ].
   797     ].
   798 
   798 
   799     list isNil ifTrue:[
   799 "/    list isNil ifTrue:[
   800         linesShownBefore := (1 to:nLinesShown) collect:[:i | ''].
   800 "/        linesShownBefore := (1 to:nLinesShown) collect:[:i | ''].
   801     ] ifFalse:[
   801 "/    ] ifFalse:[
   802         linesShownBefore := (firstLineShown to:(firstLineShown+nLinesShown-1))
   802 "/        linesShownBefore := (firstLineShown to:(firstLineShown+nLinesShown-1))
   803                             collect:[:i | (self at:i) ? ''].
   803 "/                            collect:[:i | (self at:i) ? ''].
   804     ].
   804 "/    ].
   805 
   805 
   806     list := aCollection.
   806     list := aCollection.
   807 
   807 
   808     nonStringsBefore := includesNonStrings.
   808     nonStringsBefore := includesNonStrings.
   809     includesNonStrings := false.
   809     includesNonStrings := false.
   835             self clear.
   835             self clear.
   836         ]
   836         ]
   837     ].
   837     ].
   838 "/ end new
   838 "/ end new
   839     shown ifTrue:[
   839     shown ifTrue:[
   840         linesShownBefore isNil ifTrue:[
   840           self redrawFromVisibleLine:1 to:nLinesShown
   841             self redrawFromVisibleLine:1 to:nLinesShown
   841 
   842         ] ifFalse:[
   842 "/        linesShownBefore isNil ifTrue:[
   843             1 to:nLinesShown do:[:l |
   843 "/            self redrawFromVisibleLine:1 to:nLinesShown
   844                 |oldLine newLine|
   844 "/        ] ifFalse:[
   845 
   845 "/            1 to:nLinesShown do:[:l |
   846                 newLine := self visibleAt:l.
   846 "/                |oldLine newLine|
   847                 newLine size == 0 ifTrue:[
   847 "/
   848                     newLine := ''
   848 "/                newLine := self visibleAt:l.
   849                 ].
   849 "/                newLine size == 0 ifTrue:[
   850                 oldLine := linesShownBefore at:l ifAbsent:nil.
   850 "/                    newLine := ''
   851                 oldLine size == 0 ifTrue:[
   851 "/                ].
   852                     oldLine := ''
   852 "/                oldLine := linesShownBefore at:l ifAbsent:nil.
   853                 ].
   853 "/                oldLine size == 0 ifTrue:[
   854                 oldLine ~= newLine ifTrue:[
   854 "/                    oldLine := ''
   855                     self redrawVisibleLine:l
   855 "/                ].
   856                 ]
   856 "/                oldLine ~= newLine ifTrue:[
   857             ]
   857 "/                    self redrawVisibleLine:l
   858         ]
   858 "/                ]
       
   859 "/            ]
       
   860 "/        ]
   859     ]
   861     ]
   860 
   862 
   861     "Modified: 18.12.1995 / 23:27:54 / stefan"
   863     "Modified: 18.12.1995 / 23:27:54 / stefan"
   862     "Modified: 5.3.1997 / 17:20:48 / cg"
   864     "Modified: 6.3.1997 / 15:23:37 / cg"
   863 !
   865 !
   864 
   866 
   865 size
   867 size
   866     "return the size (i.e. number of lines)
   868     "return the size (i.e. number of lines)
   867      this allows textViews to be used like collections in some places."
   869      this allows textViews to be used like collections in some places."
  3582 ! !
  3584 ! !
  3583 
  3585 
  3584 !ListView class methodsFor:'documentation'!
  3586 !ListView class methodsFor:'documentation'!
  3585 
  3587 
  3586 version
  3588 version
  3587     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.126 1997-03-05 16:31:43 cg Exp $'
  3589     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.127 1997-03-06 14:25:34 cg Exp $'
  3588 ! !
  3590 ! !