Revision: 2989
          http://vexi.svn.sourceforge.net/vexi/?rev=2989&view=rev
Author:   clrg
Date:     2008-07-22 14:46:39 +0000 (Tue, 22 Jul 2008)

Log Message:
-----------
Implement action for passfields

Modified Paths:
--------------
    trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/textfield.t

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/textfield.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/textfield.t  
2008-07-22 12:46:28 UTC (rev 2988)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/textfield.t  
2008-07-22 14:46:39 UTC (rev 2989)
@@ -85,21 +85,21 @@
             } else {
                 var val = trapee.value;
                 // delete character before cPos
-                if (do_del and v == "back_space") {
-                    if (cPos > 0) {
+                if (v == "back_space") {
+                    if (do_del and (cPos > 0)) {
                         if (cPos >= val.length)
                             trapee.value = val.substring(0, val.length-1);
                         else trapee.value = val.substring(0, cPos-1) + 
val.substring(cPos, val.length);
                     }
                 
                 // delete character after cPos
-                } else if (do_del and v == "delete") {
-                    if (val.length > cPos) {
+                } else if (v == "delete") {
+                    if (do_del and (val.length > cPos)) {
                         if (cPos > 0)
                             trapee.value = val.substring(0, cPos) + 
val.substring(cPos+1, val.length);
                         else trapee.value = val.substring (1, val.length);
                     }
-                }
+                } else if (v == "enter") trapee.action = true;
                 // must be done after as not to inadvertently modify cPos
                 edit.KeyPressed = v;
             }


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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to