Revision: 4444
          http://vexi.svn.sourceforge.net/vexi/?rev=4444&view=rev
Author:   clrg
Date:     2012-10-05 01:13:59 +0000 (Fri, 05 Oct 2012)
Log Message:
-----------
Smart enabled initialization by clickable

Modified Paths:
--------------
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/role/clickable.t

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/role/clickable.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/role/clickable.t  
2012-10-04 14:31:14 UTC (rev 4443)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/role/clickable.t  
2012-10-05 01:13:59 UTC (rev 4444)
@@ -48,7 +48,7 @@
         
         // template properties
         thisbox.action;          // action trigger
-        thisbox.enabled = true;  // self explanatory
+        thisbox.enabled;         // self explanatory
         thisbox.focused;         // focusable integration
         thisbox.active;          // active state (mouse.inside and primed)
         thisbox.hover;           // hover state (mouse.inside and !primed)
@@ -56,13 +56,19 @@
         thisbox.primed;          // track activation irrespective of 
mouse.inside
         thisbox.repeats = false; // if a repeating action is desired
         
+        // initialize enabled state (from preapply)
+        if (enabled === null)
+            enabled = true;
+        if (enabled) {
+            Enter ++= static.enterEvent;
+            Leave ++= static.leaveEvent;
+        }
+        
         // assign trap functions
         enabled     ++= static.enabledWrite;
         focused     ++= static.focusedWrite;
         interval    ++= static.intervalWrite;
         primed      ++= static.primedWrite;
-        Enter       ++= static.enterEvent;
-        Leave       ++= static.leaveEvent;
         KeyPressed  ++= static.keypressEvent;
         KeyReleased ++= static.keyreleaseEvent;
         Press1      ++= static.pressEvent;

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


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to