EditField.st
changeset 3706 d25f10e7b49b
parent 3704 f37af06fff46
child 3709 a17acdae3e35
--- a/EditField.st	Thu Sep 11 14:40:34 2008 +0200
+++ b/EditField.st	Thu Sep 11 14:43:00 2008 +0200
@@ -814,10 +814,12 @@
         ^ self
     ].
 
+    "if not (self modified) -> the input field hasn't changed.
+     But even if it has changed, the typeconverter could return the same value ('010' asInteger = '10' asInteger)"
+
     (acceptIfUnchanged not
     and:[model notNil
-    and:[model value = self editValue]]) ifTrue:[^ self].
-
+    and:[self modified not or:[model value = self editValue]]]) ifTrue:[^ self].
     super accept.
 
     converter notNil ifTrue:[
@@ -1170,8 +1172,7 @@
     In your application, please use #editValue; 
     it uses a converter (if any) and is compatible to ST-80."
 
-    list isNil ifTrue:[^ ''].
-    (list size == 0) ifTrue:[^ ''].
+    (list isEmptyOrNil) ifTrue:[^ ''].
     ^ list at:1
 !
 
@@ -2204,5 +2205,5 @@
 !EditField class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.195 2008-09-10 10:53:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.196 2008-09-11 12:43:00 stefan Exp $'
 ! !