Revision: 3913 http://vexi.svn.sourceforge.net/vexi/?rev=3913&view=rev Author: clrg Date: 2010-10-12 22:14:00 +0000 (Tue, 12 Oct 2010)
Log Message: ----------- Fix corner case for repeatable, where certain conditions (do the following before repeat interval has expired: repeat=true; repease=false; repeat=true;) would lead to multiple threads acting upon the repeatable widget Modified Paths: -------------- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/role/repeatable.t Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/role/repeatable.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/role/repeatable.t 2010-10-12 21:43:50 UTC (rev 3912) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/role/repeatable.t 2010-10-12 22:14:00 UTC (rev 3913) @@ -33,14 +33,18 @@ /** initiate (true) or stop (false) repeating action */ static.repeatWrite = function(v) { if (v) { - // only start if previously false - if (!trapee.repeat) { + // only start if previously false and thread is inactive + if (!trapee.repeat and !trapee.v_repeat_thread) { + // marks the thread as active + trapee.v_repeat_thread = true; vexi.thread = function() { while (trapee.repeat) { trapee.action = true; trapee.counter ++; vexi.thread.sleep(trapee.interval); } + // mark thread inactive + trapee.v_repeat_thread = false; } } } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn