Revision: 4343 http://vexi.svn.sourceforge.net/vexi/?rev=4343&view=rev Author: clrg Date: 2012-01-27 01:16:36 +0000 (Fri, 27 Jan 2012) Log Message: ----------- Fix value puts to passfields
Modified Paths: -------------- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/textfield.t Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/textfield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/textfield.t 2012-01-27 00:48:51 UTC (rev 4342) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/textfield.t 2012-01-27 01:16:36 UTC (rev 4343) @@ -53,12 +53,14 @@ trapee.value = val; return; - } else if (v == "C-c" or v == "C-C") { + } else + if (v == "C-c" or v == "C-C") { // handle copying vexi.ui.clipboard = ""; return; - } else if (v == "C-x" or v == "C-X") { + } else + if (v == "C-x" or v == "C-X") { // copy/delete vexi.ui.clipboard = ""; trapee.text = ""; @@ -82,6 +84,7 @@ trapee.value = val.substring(0, cPos) + v + val.substring(cPos, val.length); } else { var val = trapee.value; + vexi.trace(do_del+", "+cPos+", "+val+", "+text); if (v == "back_space") { // delete character before cPos if (do_del and (cPos > 0)) { @@ -92,7 +95,8 @@ } } - } else if (v == "delete") { + } else + if (v == "delete") { // delete character after cPos if (do_del and (val.length > cPos)) { if (cPos > 0) { @@ -101,7 +105,8 @@ trapee.value = val.substring (1, val.length); } } - } else if (v == "enter") { + } else + if (v == "enter") { trapee.action = true; } // must be done after as not to inadvertently modify cPos @@ -117,7 +122,8 @@ if (122>=c and c>=97) { v = vexi.string.fromCharCode(c-32); } - } else if (trapee.forcecase.indexOf("lower")) { + } else + if (trapee.forcecase.indexOf("lower")) { // 65-90 (A-Z) if (90>=c and c>=65) { v = vexi.string.fromCharCode(c+32); @@ -177,11 +183,12 @@ /** set the text if value is written to */ static.valueWrite = function(v) { if (trapee.password) { - cascade = v; - if (trapee.v_updatetext and val != trapee.value) { + if (trapee.v_updatetext and (val != trapee.value)) { trapee.text = v; } - } else if (trapee.v_updatetext) { + cascade = v; + } else + if (trapee.v_updatetext) { trapee.text = v; return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn