Revision: 3696
          http://vexi.svn.sourceforge.net/vexi/?rev=3696&view=rev
Author:   jeffbuhrt
Date:     2009-09-29 19:22:16 +0000 (Tue, 29 Sep 2009)

Log Message:
-----------
Added a testcase for the thread/sleep problem (also shows the 1st focus, no 
blink problem) and a simple way to add other 'testcases'

Modified Paths:
--------------
    trunk/widgets/org.vexi.demo/src/org/vexi/demo/demoitem.t
    trunk/widgets/org.vexi.demo/src/org/vexi/demo/demomenus.t

Added Paths:
-----------
    trunk/widgets/org.vexi.demo/src/org/vexi/demo/feature/option_bug.t
    trunk/widgets/org.vexi.demo/src/org/vexi/demo/feature/thread_bug.t

Modified: trunk/widgets/org.vexi.demo/src/org/vexi/demo/demoitem.t
===================================================================
--- trunk/widgets/org.vexi.demo/src/org/vexi/demo/demoitem.t    2009-09-28 
13:46:09 UTC (rev 3695)
+++ trunk/widgets/org.vexi.demo/src/org/vexi/demo/demoitem.t    2009-09-29 
19:22:16 UTC (rev 3696)
@@ -9,6 +9,7 @@
         
         thisbox.load = null;
         thisbox.text = "Box";
+        thisbox.testcase = false;
         
         thisbox.action ++= function(v) {
             if (load) surface.loadtab(text, load(vexi.box));

Modified: trunk/widgets/org.vexi.demo/src/org/vexi/demo/demomenus.t
===================================================================
--- trunk/widgets/org.vexi.demo/src/org/vexi/demo/demomenus.t   2009-09-28 
13:46:09 UTC (rev 3695)
+++ trunk/widgets/org.vexi.demo/src/org/vexi/demo/demomenus.t   2009-09-29 
19:22:16 UTC (rev 3696)
@@ -64,6 +64,8 @@
             var n = features[key]..name;
             m.text = n ? n : key;
             var s = features[key]..category;
+            if (s == "Test Cases")
+               m.testcase = true;
             if (!s) s = "Default";
             if (!submenus[s]) {
                 submenus[s] = wi.submenu(vexi.box);

Added: trunk/widgets/org.vexi.demo/src/org/vexi/demo/feature/option_bug.t
===================================================================
--- trunk/widgets/org.vexi.demo/src/org/vexi/demo/feature/option_bug.t          
                (rev 0)
+++ trunk/widgets/org.vexi.demo/src/org/vexi/demo/feature/option_bug.t  
2009-09-29 19:22:16 UTC (rev 3696)
@@ -0,0 +1,49 @@
+<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta"
+    xmlns:lay="vexi.layout"
+    xmlns="vexi.widget" 
+    xmlns:util="vexi.util"
+    xmlns:frame="org.vexi.demo.rl"
+>
+    
+    static.name = "Option Test Case";
+    static.category = "Test Cases";
+    
+    <ui:box orient="vertical">
+               <lay:grid cols="2">
+                <option id="fld1baa" helpid="ra_P1baa" >
+                               <item text="0 : None" value="0"/>
+                               <item text="1 : 1 day" value="1"/>
+                               <item text="2 : 2 days" value="2"/>
+                           </option>
+                <textfield id="fld1bab" helpid="ra_P1bab" width="60" 
maxlength="4" zerofill="true"/>
+
+                <option id="fld1bba" helpid="ra_P1bba" >
+                               <item text="0 : None" value="0"/>
+                               <item text="1 : 1 day" value="1"/>
+                               <item text="2 : 2 days" value="2"/>
+                           </option>
+                <textfield id="fld1bbb" helpid="ra_P1bbb" width="60" 
maxlength="4" zerofill="true"/>
+
+                <option id="fld1bca" helpid="ra_P1bca" >
+                               <item text="0 : None" value="0"/>
+                               <item text="1 : 1 day" value="1"/>
+                               <item text="2 : 2 days" value="2"/>
+                           </option>
+                <textfield id="fld1bcb" helpid="ra_P1bcb" width="60" 
maxlength="4" zerofill="true"/>
+
+                <option id="fld1bda" helpid="ra_P1bda" >
+                               <item text="0 : None" value="0"/>
+                               <item text="1 : 1 day" value="1"/>
+                               <item text="2 : 2 days" value="2"/>
+                           </option>
+                <textfield id="fld1bdb" helpid="ra_P1bdb" width="60" 
maxlength="4" zerofill="true"/>
+
+                <option id="fld1bea" helpid="ra_P1bea">
+                               <item text="0 : None" value="0"/>
+                               <item text="1 : 1 day" value="1"/>
+                               <item text="2 : 2 days" value="2"/>
+                           </option>
+                <textfield id="fld1beb" helpid="ra_P1beb" width="60" 
maxlength="4" zerofill="true"/>
+            </lay:grid>            
+       </ui:box>
+</vexi>
\ No newline at end of file

Added: trunk/widgets/org.vexi.demo/src/org/vexi/demo/feature/thread_bug.t
===================================================================
--- trunk/widgets/org.vexi.demo/src/org/vexi/demo/feature/thread_bug.t          
                (rev 0)
+++ trunk/widgets/org.vexi.demo/src/org/vexi/demo/feature/thread_bug.t  
2009-09-29 19:22:16 UTC (rev 3696)
@@ -0,0 +1,45 @@
+<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta"
+    xmlns:lay="vexi.layout"
+    xmlns="vexi.widget" 
+    xmlns:util="vexi.util"
+>
+    
+    static.name = "Thread Race Test Case";
+    static.category = "Test Cases";
+
+    <lay:pad orient="vertical" padding="10">
+       <ui:box shrink="true">
+               <ui:box text="Focus is 1st here (eventhough it is never 
visually shown) -->" />
+               <textfield id="firstfocused" text="" width="40" />
+       </ui:box>
+       
+       <ui:box text="If you press the bottom test button first you will see 
how it should work." shrink="true" />
+
+       <ui:box shrink="true">
+                       <button id="stepone" text="Push me to move focus to 
this box -->" shrink="true" />
+                       <textfield id="nextfocused" text="" width="40" />
+               </ui:box>
+
+               <ui:box shrink="true">
+                       <ui:box text="After the blinking stops above, press 
then watch the console..." />
+               <button id="testit" text="Push to try a thread with a sleep" />
+       </ui:box>
+       
+
+        $stepone.action ++= function(b) {
+               $nextfocused.focused=true;
+
+            cascade = b;
+        }
+
+               $testit.action ++= function(v)
+           {
+                       vexi.thread = function() {
+               vexi.log.info("thread/sleep testcase (you should see a 2nd 
message when sleep doesn't hang)");
+                vexi.thread.sleep(1);
+                vexi.log.info("testcase worked! Sleep didn't hang.");
+                       }
+                       cascade = v;
+           }
+    </lay:pad>
+</vexi>
\ No newline at end of file


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

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to