index inside for [message #759615] |
Tue, 29 November 2011 10:58 |
Eclipse User |
|
|
|
Hello,
I want to use the "i" var feature inside a for loop
Try to do :
[for (str : String | ... )]
[str.toString()/]=[i/];
[/for]
But I have a syntax error
What do I miss
Thank you
|
|
|
Re: [Acceleo 3] index inside for [message #759648 is a reply to message #759615] |
Tue, 29 November 2011 13:13 |
Eclipse User |
|
|
|
Hello,
Sorry for overposting, I forgot to tag my post with [Acceleo 3]
I want to use the "i" var feature inside a for loop
I Try to do :
[for (str : String | ... )]
[str.toString()/]=[i/];
[/for]
But I have a syntax error about i not recongnized...
What do I miss ?
Thank you
|
|
|
Re: [Acceleo 3] index inside for [message #760087 is a reply to message #759648] |
Thu, 01 December 2011 09:20 |
|
Hi Cédric,
The "i" variable is there since 3.0 and should be recognized whenever you are inside of a for. Which version of Acceleo are you using? Maybe you could you provide us with a sample module that presents this issue? A basic test on my side did compile correctly.
Laurent Goubet
Obeo
|
|
|
Re: [Acceleo 3] index inside for [message #762021 is a reply to message #760087] |
Wed, 07 December 2011 12:49 |
Eclipse User |
|
|
|
Hi Laurent
Sorry for the delay of my answer
> The "i" variable is there since 3.0 and should be recognized whenever
> you are inside of a for. Which version of Acceleo are you using? Maybe
> you could you provide us with a sample module that presents this issue?
> A basic test on my side did compile correctly.
Here the code I use :
[for (str : String | sm.eAllContents(State)
->select(s | not(s.isComposite))
->collect(st | sm.getNormalizedName().toUpper() +
st.getNormalizedName().toUpperFirst()) ) separator (',\n')]
[str.toString()/]=[i/][/for]
And the error is :
Error : An error occured while saving generate.emtl : The object 'i :
Integer' is not contained in a resource.
My version of acceleo is : 3.1.1 (2011 14 09)
What do I miss ?
Best regards
|
|
|
|
Powered by
FUDForum. Page generated in 0.04962 seconds