[vassalengine-svn-trunk] [vassalengine-svn] SF.net SVN: vassalengine:[5842] VASSAL-src/trunk/src/VA
Brought to you by:
rodneykinney,
uckelman
From: <swa...@us...> - 2009-07-13 10:51:13
|
Revision: 5842 http://vassalengine.svn.sourceforge.net/vassalengine/?rev=5842&view=rev Author: swampwallaby Date: 2009-07-13 10:51:02 +0000 (Mon, 13 Jul 2009) Log Message: ----------- RFE [2813702] Add looping to Trigger Action and Multi-Action button * Counterd loops should not throw RecursionLimitException Modified Paths: -------------- VASSAL-src/trunk/src/VASSAL/build/module/DoActionButton.java VASSAL-src/trunk/src/VASSAL/tools/LoopControl.java Modified: VASSAL-src/trunk/src/VASSAL/build/module/DoActionButton.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/build/module/DoActionButton.java 2009-07-11 13:51:02 UTC (rev 5841) +++ VASSAL-src/trunk/src/VASSAL/build/module/DoActionButton.java 2009-07-13 10:51:02 UTC (rev 5842) @@ -605,20 +605,19 @@ } } - // Check for infinite looping. Save any - // loop Exception to be thrown after the post-loop code - // to ensure post-loop key is executed. - if (loopCounter++ >= LoopControl.LOOP_LIMIT) { - loopException = new RecursionLimitException(this); - break; - } - // Counted loop - Check if looped enough times if (LoopControl.LOOP_COUNTED.equals(loopType)) { - if (loopCounter >= loopCountLimit) { + if (loopCounter++ >= loopCountLimit) { break; } } + // Otherwise check for too much looping. + else { + if (loopCounter++ >= LoopControl.LOOP_LIMIT) { + loopException = new RecursionLimitException(this); + break; + } + } // Increment the Index Variable indexValue += indexStep; Modified: VASSAL-src/trunk/src/VASSAL/tools/LoopControl.java =================================================================== --- VASSAL-src/trunk/src/VASSAL/tools/LoopControl.java 2009-07-11 13:51:02 UTC (rev 5841) +++ VASSAL-src/trunk/src/VASSAL/tools/LoopControl.java 2009-07-13 10:51:02 UTC (rev 5842) @@ -27,7 +27,7 @@ public class LoopControl { // Limit number of loops before throwing a RecusionLimitException - public static final int LOOP_LIMIT = 200; + public static final int LOOP_LIMIT = 500; // Loop Types - saved in buildfile public static final String LOOP_COUNTED = "counted"; //$NON-NLS-1$ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ vassalengine-svn mailing list vas...@li... https://lists.sourceforge.net/lists/listinfo/vassalengine-svn |