> // iterate over brick groups and include them
> brickGroups = wall.getBrickGroups();
> for (i = 0; i < brickGroups.size(); i++) {
>sling.include(brickGroups.get(i).getPath());
> }
It is OT but in such a situation one probably could/should use a for-each loop
instead:
for (BrickGroup brickG
Andreas Kuckartz wrote:
// iterate over brick groups and include them
brickGroups = wall.getBrickGroups();
for (i = 0; i < brickGroups.size(); i++) {
sling.include(brickGroups.get(i).getPath());
}
It is OT but in such a situation one probably could/should use a for-each loop
instead:
Hi,
On Thu, Sep 24, 2009 at 7:06 AM, Markus Pallo wrote:
> ...I made a test and changed wall/html.esp as seen below.
> i before include is "1" and after include its "3".
> So "i" of the wall is changed by having also "i" in brickgroup template.
>
>
>
> ---
> brickGrou
Bertrand Delacretaz schrieb:
Hi,
On Thu, Sep 24, 2009 at 7:06 AM, Markus Pallo wrote:
...I made a test and changed wall/html.esp as seen below.
i before include is "1" and after include its "3".
So "i" of the wall is changed by having also "i" in brickgroup template.
---
> i before include is "1" and after include its "3".
> So "i" of the wall is changed by having also "i" in brickgroup
template.
> for (i = 0; i < brickGroups.size(); i++) {
Where is 'i' declared? (Such problems are one of the reasons for
for-each loops)
Cheers,
Andreas
only indirect in the for loop.
i am wondering why the included script, which has also i in the for
loop, changes the value of the surrounding script.
I thought includes uses own scope.
Markus
Andreas Kuckartz wrote:
i before include is "1" and after include its "3".
So "i" of the wall is ch