Revision: 4189
          http://vexi.svn.sourceforge.net/vexi/?rev=4189&view=rev
Author:   clrg
Date:     2011-07-12 00:04:44 +0000 (Tue, 12 Jul 2011)

Log Message:
-----------
Fix $monthfield.value = null; put

Modified Paths:
--------------
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t
    trunk/org.vexi-vexi.widgets/src_main/vexi/widget/monthfield.t
    trunk/org.vexi-vexi.widgets/src_poke/poke/widgets/datefield.t

Modified: 
trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t    
2011-07-11 13:15:11 UTC (rev 4188)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/monthfield.t    
2011-07-12 00:04:44 UTC (rev 4189)
@@ -1,4 +1,4 @@
-<!-- Copyright 2009 - see COPYING for details [LGPL] -->
+<!-- Copyright 2011 - see COPYING for details [LGPL] -->
 
 <vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme"
     xmlns:conf="vexi.conf"
@@ -48,7 +48,7 @@
         thisbox.v_popbox  = $popbox;
         thisbox.v_textbox = false;
         
-        thisbox.v_date; ///> vexi.js.Date
+        thisbox.value; ///> vexi.js.Date
         
         ////////
         // internal behaviour
@@ -56,16 +56,13 @@
         thisbox.month ++= static.partWrite;
         thisbox.year  ++= static.partWrite;
         
-        thisbox.v_date ++= function(v) {
+        thisbox.value ++= function(v) {
             cascade = v;
-            assert(v!=null);
-            $month.text = v.month;
-            $year.text = v.year;
+            //assert(v===null or v instanceof "date");
+            $month.text = v?.month;
+            $year.text = v?.year;
         }
         
-        thisbox.value ++= static.valueRead;
-        thisbox.value ++= static.valueWrite;
-        
         ////////
         // button actions
         
@@ -77,8 +74,7 @@
         $year.Press1  ++= selectPart;
         
         var setToday = function() {
-            date = new vexi.js.Date();
-            value = v_date;
+            value = new vexi.js.Date();
         }
         
         $more.action ++= function(v) {
@@ -215,7 +211,7 @@
                     if (value==null) {
                         setToday();
                     } else {
-                        value = v_date;
+                        value = value;
                     }
                     break;
                 case "back_space":
@@ -270,11 +266,11 @@
     
     static.popdownWrite = function(v) {
         cascade = v;
-        trapee.value = trapee.v_date;
+        trapee.value = trapee.value;
     }
     
     static.textRead = function() {
-        return trapee.v_date+"";
+        return trapee.value+"";
     }
     
     static.textWrite = function(v) {
@@ -282,14 +278,4 @@
         trapee.value = d.tryParseString(v);
     }
     
-    static.valueRead = function() {
-        return trapee.v_date;
-    }
-    
-    static.valueWrite = function(v) {
-        assert(typeof(v)=="date");
-        trapee.v_date = v;
-        return;
-    }
-    
 </vexi>

Modified: trunk/org.vexi-vexi.widgets/src_main/vexi/widget/monthfield.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/vexi/widget/monthfield.t       
2011-07-11 13:15:11 UTC (rev 4188)
+++ trunk/org.vexi-vexi.widgets/src_main/vexi/widget/monthfield.t       
2011-07-12 00:04:44 UTC (rev 4189)
@@ -1,4 +1,4 @@
-<!-- Copyright 2009 - see COPYING for details [LGPL] -->
+<!-- Copyright 2011 - see COPYING for details [LGPL] -->
 
 <vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns:theme="vexi.theme"
     xmlns="org.vexi.lib.layout">

Modified: trunk/org.vexi-vexi.widgets/src_poke/poke/widgets/datefield.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_poke/poke/widgets/datefield.t       
2011-07-11 13:15:11 UTC (rev 4188)
+++ trunk/org.vexi-vexi.widgets/src_poke/poke/widgets/datefield.t       
2011-07-12 00:04:44 UTC (rev 4189)
@@ -7,9 +7,12 @@
         </ui:box-->
         <ui:box>
             <w:monthfield id="date3" inputformat="MMYYYY" 
valueformat="MM-YYYY" />
+            <w:button id="put" text="Put" />
             <w:monthfield id="date4" inputformat="YYYYMM" 
valueformat="01-MM-YYYY" />
         </ui:box>
-       
+        
+        $put.action ++= function(v) { $date3.value = null; return; }
+        
         vexi.ui.frame = thisbox;
         
     </ui:box>


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

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to