Revision: 4382 http://vexi.svn.sourceforge.net/vexi/?rev=4382&view=rev Author: clrg Date: 2012-05-04 02:24:21 +0000 (Fri, 04 May 2012) Log Message: ----------- Update value on keypress by default
Modified Paths: -------------- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/numfield.t Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/numfield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/numfield.t 2012-04-26 09:33:42 UTC (rev 4381) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/numfield.t 2012-05-04 02:24:21 UTC (rev 4382) @@ -10,8 +10,10 @@ <text.field /> <ui:box> - thisbox.v_edit; // abstract - thisbox.enabled = true; + thisbox.v_edit; // abstract + + thisbox.enabled = true; + thisbox.updateValueonKeyPressed = true; thisbox.minvalue; thisbox.maxvalue; @@ -84,7 +86,7 @@ /** when focus changes, self put text in case text content is updated */ static.focusWrite = function(v) { - if (!v) { + if (!v and !trapee.updateValueonKeyPressed) { // trigger value setting trapee.v_edit.text = trapee.v_edit.text; } @@ -142,6 +144,11 @@ // Due to possibility of selection, not just editing a single char // let the text widget handle this and correct as necessary cascade = v; + + if (trapee.updateValueonKeyPressed) { + // trigger value setting + trapee.v_edit.text = trapee.v_edit.text; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn