so if i have a large codebase of openlaszlo 4.9 code, where the use of "id" worked fine in swf8, i have to either 1) not use "id" or 2) use canvas attributes as mentioned below?
is this documented anywhere in the openlaszlo developer's guide? because compiling my code to swf8 does not have any of these problems. augusto. On Mar 9, 2012, at 12:09 AM, [email protected] wrote: > No, it generates AS3 from your Openlaszlo code and feeds the Flex4.5 compiler > with it. > > Id is the evel :)) It is like global vars. > You should not use id, I did not had any of those problems, but actually we > do not use the tag "id" at all in SWF10 apps. > > A simple workaround would be to create a canvas attribute and assign the > variable "oninit" > > Example > > In canvas: > <attribute name="settingsDialog" value="null" /> > > > > <topDialog id="settingsDialog" titleFont="${canvas.msgFont. > data}"> > <hanlder name="oninit"> > canvas.settingsDialog = this; > </handler> > <!-- don't miss to clear the reference when you "destroy" the view > otherwise the garbage collector might not be able to remove the > view from the memory --> > <method name="close"> > canvas.settingsDialog = null; > this.destroy(); > </method> > </topDialog> > > It might also just work to declare the attribute in canvas but keeping the > usage of the id's. > > Sebastian > > 2012/3/9 augusto callejas <[email protected]> > this is what settingsDialog looks like in openlaszlo: > > <topDialog id="settingsDialog" titleFont="${canvas.msgFont.data}"> > > topDialog is a custom class i wrote. compiling to swf8 works, but these > errors occur when compiling to swf10. > i assume its converting my openlaszlo code to swf10 code, then trying to > compile that. > > On Mar 8, 2012, at 11:25 PM, [email protected] wrote: > >> have your attribute declarations a type parameter? >> For example "settingsDialog" >> >> 2012/3/9 augusto callejas <[email protected]> >> if i comment out the font tags, i can make more progress in the compilation, >> but then i get a many errors like this: >> >> === >> org.openlaszlo.sc.CompilerError: line unknown: Warning: variable '$0' has no >> type declaration, in line: var $0 = stage.loaderInfo.parameters.id; >> line unknown: Warning: parameter '$1' has no type declaration, in line: >> catch ($1) {}; >> line unknown: Warning: variable '$2' has no type declaration, in line: var >> $2 = stage.loaderInfo.parameters.id; >> line unknown: Warning: parameter '$3' has no type declaration, in line: >> catch ($3) {}}} >> line unknown: Warning: variable 'dateUtil' has no type declaration, in line: >> public var dateUtil = null;} >> line unknown: Warning: variable 'settingsDialog' has no type declaration, in >> line: public var settingsDialog = null;} >> line unknown: Warning: variable 'variancePoller' has no type declaration, in >> line: public var variancePoller = null;} >> line unknown: Warning: variable 'title' has no type declaration, in line: >> public var title = null;} >> line unknown: Warning: variable 'newPointer' has no type declaration, in >> line: public var newPointer = null;} >> line unknown: Warning: variable 'phoneMask' has no type declaration, in >> line: public var phoneMask = null;} >> .... >> .... more than 50 errors, additional errors not shown. >> === >> >> is this a common occurrence when compiling to swf10 on openlaszlo? >> >> augusto. >> >> On Mar 8, 2012, at 6:34 PM, augusto callejas wrote: >> >>> i was able to figure out my problem (my build wasn't including >>> WEB-INF/bin/mxmlc .. but now i'm running in to this problem: >>> >>> org.openlaszlo.sc.CompilerError: line unknown: Warning: variable '$0' has >>> no type declaration, in line: var $0 = stage.loaderInfo.parameters.id; >>> line unknown: Warning: parameter '$1' has no type declaration, in line: >>> catch ($1) {}; >>> line unknown: Warning: variable '$2' has no type declaration, in line: var >>> $2 = stage.loaderInfo.parameters.id; >>> line unknown: Warning: parameter '$3' has no type declaration, in line: >>> catch ($3) {}}} >>> /private/var/..../LzApplication.as(422): Error: exception during >>> transcoding: Unexpected exception encountered while reading font file >>> '/Users/..../lps/fonts/helmetb.ttf' >>> [Embed(mimeType='application/x-font', >>> source='/Users/..../lps/fonts/helmetb.ttf', fontName='helmetb', >>> fontWeight='bold',fontStyle='plain',advancedAntiAliasing='true',embedAsCFF='false')] >>> base/colors.lzx: 29: : Error: unable to build font 'helmetb', in line: >>> [Embed(mimeType='application/x-font', >>> source='/Users/…./lps/fonts/helmetb.ttf', fontName='helmetb', >>> fontWeight='bold',fontStyle='plain',advancedAntiAliasing='true',embedAsCFF='false')] >>> >>> regarding the fonts, someone posted something similar in the past: >>> >>> http://www.openlaszlo.org/pipermail/laszlo-user/2010-June/008204.html >>> >>> however, i'm following their advice: >>> >>> <canvas> >>> ... >>> <font name="verdanaBold" src="verdanaBold.ttf" style="bold"/> >>> ... >>> </canvas> >>> >>> any ideas? >>> >>> thanks, >>> augusto. >>> >>> On Mar 7, 2012, at 11:40 AM, [email protected] wrote: >>> >>>> That could be actually a LZX client side error. >>>> I have been facing this error when using a LZX class that was not defined. >>>> You should be looking at the index.lzx. The problem is in there. >>>> >>>> Sebastian >>>> >>>> 2012/3/7 augusto callejas <[email protected]> >>>> hi- >>>> >>>> i'm attempting to compile a laszlo file via the browser at this address: >>>> >>>> /index.lzx?lzr=swf10 >>>> >>>> generates this error: >>>> >>>> ==== >>>> java.lang.NullPointerException >>>> at >>>> org.openlaszlo.sc.SWF9External.callJavaCompileCommand(SWF9External.java:925) >>>> at >>>> org.openlaszlo.sc.SWF9External.compileTranslationUnits(SWF9External.java:1249) >>>> at >>>> org.openlaszlo.sc.SWF9Generator.callFlexCompiler(SWF9Generator.java:1048) >>>> at org.openlaszlo.sc.SWF10Compiler.finishApp(SWF10Compiler.java:61) >>>> at org.openlaszlo.compiler.SWF9Writer.finish(SWF9Writer.java:548) >>>> at org.openlaszlo.compiler.ObjectWriter.finish(ObjectWriter.java:494) >>>> at org.openlaszlo.compiler.Compiler.compile(Compiler.java:481) >>>> at org.openlaszlo.compiler.Compiler.compile(Compiler.java:199) >>>> at >>>> org.openlaszlo.cm.CompilationManager.compileItem(CompilationManager.java:735) >>>> at >>>> org.openlaszlo.cm.CompilationManager.getItem(CompilationManager.java:459) >>>> at >>>> org.openlaszlo.cm.CompilationManager.getLastModified(CompilationManager.java:427) >>>> at >>>> org.openlaszlo.servlets.responders.ResponderCompile.getLastModified(ResponderCompile.java:401) >>>> at >>>> org.openlaszlo.servlets.responders.ResponderCompile.respondImpl(ResponderCompile.java:185) >>>> at >>>> org.openlaszlo.servlets.responders.Responder.respond(Responder.java:266) >>>> at org.openlaszlo.servlets.LZServlet._doGet(LZServlet.java:437) >>>> at org.openlaszlo.servlets.LZServlet.doGet(LZServlet.java:351) >>>> ==== >>>> >>>> looking at the code: >>>> >>>> ==== >>>> if (exitval[0].intValue() != 0) { >>>> System.err.println("FAIL: compiler returned " + >>>> exitval[0].intValue()); >>>> } >>>> ==== >>>> >>>> looks like exitval is null or exitval[0] is null? >>>> >>>> any help appreciated. >>>> >>>> thanks, >>>> augusto. >>>> >>>> >>>> >>>> -- >>>> Sebastian Wagner >>>> http://www.openmeetings.de >>>> http://incubator.apache.org/openmeetings/ >>>> http://www.webbase-design.de >>>> http://www.wagner-sebastian.com >>>> [email protected] >>> >> >> >> >> >> -- >> Sebastian Wagner >> http://www.openmeetings.de >> http://incubator.apache.org/openmeetings/ >> http://www.webbase-design.de >> http://www.wagner-sebastian.com >> [email protected] > > > > > -- > Sebastian Wagner > http://www.openmeetings.de > http://incubator.apache.org/openmeetings/ > http://www.webbase-design.de > http://www.wagner-sebastian.com > [email protected]
