Revision: 3435
          http://vexi.svn.sourceforge.net/vexi/?rev=3435&view=rev
Author:   clrg
Date:     2009-03-20 23:23:49 +0000 (Fri, 20 Mar 2009)

Log Message:
-----------
Update field value (i.e. write notify) at convenient times

Modified Paths:
--------------
    trunk/widgets/org.vexi.widgets/src/org/vexi/lib/text/field.t

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/text/field.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/text/field.t        
2009-03-19 02:34:00 UTC (rev 3434)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/text/field.t        
2009-03-20 23:23:49 UTC (rev 3435)
@@ -66,10 +66,11 @@
         }
         
         // fire action
-        if (v == "enter" || v == "ENTER")
+        if (v == "enter" || v == "ENTER") {
             trapee.action = true;
+            trapee.value = trapee.value;
         // pass to edit
-        else edit.KeyPressed = v;
+        } else edit.KeyPressed = v;
     }
     
     /** retrieve a integer offset of where the cursor is within the textfield 
*/
@@ -111,18 +112,19 @@
         var f = trapee.focused;
         var sync = trapee.syncViewWithCursor;
         edit.focused = f;
-        if (trapee.selectonfocus) {
-            if (f) edit.selectAll();
-            else edit.unselectAll();
-        }
-        if (cursor and sync) {
-            if (f) {
+        if (f) {
+            if (trapee.selectonfocus) edit.selectAll();
+            if (cursor and sync) {
                 cursor.x ++= sync;
                 trapee.th_viewport.width ++= sync;
-            } else {
+            }
+        } else {
+            if (trapee.selectonfocus) edit.unselectAll();
+            if (cursor and sync) {
                 cursor.x --= sync;
                 trapee.th_viewport.width --= sync;
             }
+            trapee.value = trapee.value;
         }
     }
     


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to