> Having just recently taken a stab @ ISL scripting, I can attest to its
> utility and potential ... and it does make for much nicer looking text
> rendering. But the key word is "potential" ... it currently lacks some
> basic features of scripting languages ... such as the ability to set an
> integer value and then increment it (very useful when creating an animation
> loop).
>
>
Haven't actually tested this (but it compiles) but the following code would
add a for isl tag that looks like:
<for start="0" limit="10" delta="1">
....
</for>
protected boolean processTagFor(Element node) throws Throwable {
pushProperties();
List allValues = new ArrayList();
int numElements = 0;
int cnt = 1;
int start = XmlUtil.getAttribute(node, "start",0);
int limit = XmlUtil.getAttribute(node, "limit",0);
int delta = XmlUtil.getAttribute(node, "delta",1);
for(int i=start;i<limit;i+=delta) {
putProperty("index", ""+i);
try {
if ( !processChildren(node)) {
return false;
}
} catch (MyBreakException be) {
break;
} catch (MyContinueException ce) {}
}
popProperties();
return true;
}