EditField.st
changeset 130 338e856bddc9
parent 128 06a050529335
child 131 208fa92f434d
--- a/EditField.st	Fri May 19 18:41:01 1995 +0200
+++ b/EditField.st	Tue Jun 06 06:16:07 1995 +0200
@@ -27,7 +27,7 @@
 COPYRIGHT (c) 1990 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.23 1995-05-17 12:24:53 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.24 1995-06-06 04:13:12 claus Exp $
 '!
 
 !EditField class methodsFor:'documentation'!
@@ -48,7 +48,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.23 1995-05-17 12:24:53 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.24 1995-06-06 04:13:12 claus Exp $
 "
 !
 
@@ -96,11 +96,11 @@
 
       acceptOnLeave  <Boolean>                  if true, leaving the field (via cursor keys)
 						automatically accepts the value into the model.
-						Default is false.
+						Default is true.
 
       acceptOnReturn <Boolean>                  if true, leaving the field via return
 						automatically accepts the value into the model.
-						Default is false.
+						Default is true.
 "
 !
 
@@ -605,7 +605,7 @@
     oldWidth := self widthOfContents.
     super list:l.
     self widthOfContents ~~ oldWidth ifTrue:[
-	self changed:#preferedExtent
+	self changed:#preferredExtent
     ]
 !
 
@@ -807,8 +807,10 @@
     fixedSize := true.
     nFullLinesShown := 1.
     nLinesShown := 1.
-    immediateAccept := acceptOnLeave := false.
-    acceptOnReturn := false. "/ true.
+    immediateAccept := false.
+"/    acceptOnLeave := false.
+"/    acceptOnReturn := false.
+    acceptOnLeave := acceptOnReturn := true.
     cursorShown := true.
     leaveKeys := self class defaultLeaveKeys.
 !
@@ -860,8 +862,8 @@
 
 !EditField methodsFor:'queries'!
 
-preferedExtent
-    "return the prefered extent of this view.
+preferredExtent
+    "return the preferred extent of this view.
      That is the width of the string plus some extra, 
      but not wider than half of the screen"
 
@@ -869,7 +871,7 @@
 
     string := self contents.
     (string isNil or:[string isBlank]) ifTrue:[
-	string := '          ' "/ just any string is ok ^ super preferedExtent
+	string := '          ' "/ just any string is ok ^ super preferredExtent
     ].
     w := (((font on:device) widthOf:string) * 1.5) rounded.
     w := w min:(device width // 2).
@@ -991,10 +993,10 @@
     "
     xCol := (self xOfCol:cursorCol inVisibleLine:cursorLine) - leftOffset.
     (xCol > (width * (5/6))) ifTrue:[
-	self changed:#preferedExtent
+	self changed:#preferredExtent
     ] ifFalse:[
 	newWidth < (width * (1/6)) ifTrue:[
-	    self changed:#preferedExtent
+	    self changed:#preferredExtent
 	]
     ].
 
@@ -1068,4 +1070,3 @@
 	self deleteFromLine:2 toLine:(list size)
     ]
 ! !
-