Revision: 2106
          http://vexi.svn.sourceforge.net/vexi/?rev=2106&view=rev
Author:   clrg
Date:     2007-09-01 05:03:15 -0700 (Sat, 01 Sep 2007)

Log Message:
-----------
Make focusable work better with sub-widgets
- trap on Press1 instead of _Press1 for focusable
- return instead of cascade in Press1 trap
- replace some tabs

Modified Paths:
--------------
    trunk/widgets/org.vexi.widgets/src/org/vexi/lib/role/focusable.t

Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/role/focusable.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/role/focusable.t    
2007-09-01 11:57:19 UTC (rev 2105)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/role/focusable.t    
2007-09-01 12:03:15 UTC (rev 2106)
@@ -48,7 +48,7 @@
         nextfocus ++= static.nextFocusFunc;
         prevfocus ++= static.prevFocusFunc;
         surface   ++= static.surfaceFunc;
-        _Press1   ++= static.pressFunc;
+        Press1    ++= static.pressFunc;
         
     </ui:box>
     
@@ -65,10 +65,10 @@
     /** write trap to set focused state */
     static.focusedFunc = function(v)
     {
-       cascade = trapee.surface
-           ? trapee.surface.setFocus(trapee, v and trapee.focusable)
-           : false;
-     }
+        cascade = trapee.surface
+            ? trapee.surface.setFocus(trapee, v and trapee.focusable)
+            : false;
+    }
     
     /** read trap to return the focus after trapee on the surface */
     static.nextFocusFunc = function() { return 
trapee.surface.nextFocus(trapee); }
@@ -92,10 +92,10 @@
     /** write trap to focus on Press1 */
     static.pressFunc = function(v)
     {
-        // cascade so widgets can adjust focusable if post-applied
-        cascade = v;
         if (!trapee.focused and trapee.focusable)
             trapee.focused = true;
+        // prevent focusing of widgets under focusable widgets
+        return;
     }
 
 </vexi>


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to