Remove unused vars
authorStefan Vogel <sv@exept.de>
Fri, 09 Aug 2002 16:29:48 +0200
changeset 2577 a6584be928e8
parent 2576 8af235849704
child 2578 d5cdeaff2431
Remove unused vars
ListView.st
--- a/ListView.st	Fri Aug 09 15:19:14 2002 +0200
+++ b/ListView.st	Fri Aug 09 16:29:48 2002 +0200
@@ -569,19 +569,19 @@
 at:index put:aString
     "change a line and redisplay"
 
-    |visibleLine y fontHeightBefore widthBefore|
+    |fontHeightBefore widthBefore|
 
     fontHeightBefore := fontHeight.
     widthBefore := widthOfWidestLine.
     self withoutRedrawAt:index put:aString.
 
     shown ifTrue:[
-	fontHeightBefore ~= fontHeight ifTrue:[
-	    "/ must redraw everything
-	    self invalidate.
-	    ^ self
-	].
-	self redrawLine:index.
+        fontHeightBefore ~= fontHeight ifTrue:[
+            "/ must redraw everything
+            self invalidate.
+            ^ self
+        ].
+        self redrawLine:index.
 
 "/ the code below is wrong - we really have to redraw everything, if the
 "/ fontHeight changes (due to a labelAndIcon in the list).
@@ -599,16 +599,16 @@
 "/            self redrawLine:index
 "/        ].
 
-	"/ asynchronous:
+        "/ asynchronous:
 "/        visibleLine := self listLineToVisibleLine:index.
 "/        visibleLine notNil ifTrue:[
 "/            y := self yOfVisibleLine:visibleLine.
 "/            self invalidate:((margin @ y) extent:(width@fontHeight))
 "/        ].
 
-	widthBefore ~~ widthOfWidestLine ifTrue:[
-	    self contentsChanged
-	]
+        widthBefore ~~ widthOfWidestLine ifTrue:[
+            self contentsChanged
+        ]
     ]
 
     "Modified: / 26.7.1998 / 13:36:33 / cg"
@@ -854,7 +854,7 @@
 removeFromIndex:startLineNr toIndex:endLineNr
     "delete some lines"
 
-    |wasOn nLines needDraw|
+    |nLines|
 
     list isNil ifTrue:[^ self].
 
@@ -865,14 +865,14 @@
 
     ((startLineNr <= self lastLineShown)
     and:[endLineNr >= firstLineShown]) ifTrue:[
-	startLineNr to:self lastLineShown do:[:eachLine |
-	    self invalidateLine:eachLine
-	].
+        startLineNr to:self lastLineShown do:[:eachLine |
+            self invalidateLine:eachLine
+        ].
     ].
 
     nLines := list size.
     (firstLineShown >= nLines) ifTrue:[
-	self makeLineVisible:nLines
+        self makeLineVisible:nLines
     ].
     self contentsChanged.
 !
@@ -2017,15 +2017,13 @@
 sizeChanged:how
     "size changed - move origin up if possible"
 
-    |listSize newOrigin|
-
     super sizeChanged:how.
 
     self computeNumberOfLinesShown.
 
     innerWidth := width - textStartLeft - margin.
 
-"/ Makes trouble when fighting with SelListViews sizeCHanged-positioning ...
+"/ Makes trouble when fighting with SelListViews sizeChanged-positioning ...
 "/
 "/    shown ifFalse:[^ self].
 "/    list isNil ifTrue:[^ self].
@@ -2713,8 +2711,6 @@
      Subclasses with selections or other additional visible stuff should redefine
      this method."
 
-    |w|
-
     ^ innerWidth
 
 "/    "for small width, its not worth searching for
@@ -3869,7 +3865,7 @@
         self originWillChange.
         firstLineShown := newFirstLine.
         viewOrigin := newViewOrigin.
-viewOrigin x < 0 ifTrue:[self halt].
+viewOrigin x < 0 ifTrue:[self error:'bad view origin'].
         ^ self originChanged:delta
     ].
 
@@ -4458,5 +4454,5 @@
 !ListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.271 2002-08-09 13:19:14 mb Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.272 2002-08-09 14:29:48 stefan Exp $'
 ! !