PDA

View Full Version : Moving from 3.4.x to 4.1.1 issues


spoco2
07-16-2008, 11:01 PM
Hi all,

During a bit of free time I've tried to move our app in a test environment over to 4.1.1... but am having issues.

My current one is with this method:

<method name="getCostsForDate" args="dateval" >
for(rdtm in this.refdatalist){
if(this.refdatalist[rdtm].getCostsForDate(dateval)){
//Debugger.write(3,'Done '+rdtm);
}
}
</method>

Where this.refdatalist is hash of pointers to class instances, all of which have the method getCostsforDate(). This method works fine in 3.4.x, but I'm getting the following issue when trying to run it in 4.1.1:
Syntax error: the token "function getCostsForDate ( dateval ) { #beginContent #pragma 'methodName=getCostsForDate' #pragma 'withThis' for ( rdtm in this . refdatalist )" was not expected at this position.

Which baffles me... anyone know what's the issue here?

senshi
07-16-2008, 11:53 PM
Try to add "var" in front of the "rdtm" variable, then it should work again. Created LPP-6684 (http://www.openlaszlo.org/jira/browse/LPP-6684) to fix this issue.

spoco2
07-17-2008, 02:43 PM
Try to add "var" in front of the "rdtm" variable, then it should work again. Created LPP-6684 (http://www.openlaszlo.org/jira/browse/LPP-6684) to fix this issue.

Ahh, thanks for that, yes, that made it compile... I thought I had got rid of all instances of not declaring the loop var as a var... so this is kinda handy actually, pinpoints where I've not done so. (it would seem, just once)

However, once it compiles I'm left with a debugger fuuuuuullll of errors and flash timeouts galore, combined with nothing being shown at all... so I think I'll drop the migration for the time being, looks like it'll be a lot of work.