This mostly works - except when I compile from the server in swf10. Once
I've compiled my lib1 and lib2 fat LZOs for swf10 debug mode, the app
refuses to start unless I'm compiling with debug=true:
VerifyError: Error #1014: Class LzView could not be found.
at flash.display::MovieClip/nextFrame()
at LzPreloader/enterFrame()
Maybe the fat LZOs need to account for the version of the LFC they
should be linked against?
On 5/20/10 5:52 PM, Henry Minsky wrote:
UPDATED , script element tag in lzo had missing whitespace in between
attributes open tag
Change 20100520-hqm-Q by [email protected] on 2010-05-20 01:30:13 EDT
in /Users/hqm/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: make lzo files include platform-specific library object code
New Features:
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: max
Doc Reviewer: (pending)
Documentation:
Release Notes:
Overview:
+ lzo files are now implemented as zip archives, and contain optional .swc
(flash 10) and .js (dhtml) object code files
When targeting swf10 and dhtml, the if the compiler sees the platform-specific
entry in the lzo file, it will link
against it directly, rather than compiling the lzs script code block from the
lzo.
Details:
Tests:
ant lztest
smokecheck swf10/dhtml
amazon in dhtml/swf10
compile the libraries below with
lzc -c -g1 --runtime=swf10,dhtml lib1.lzx
lzc -c -g1 --runtime=swf10,dhtml lib2.lzx
then compile/run main app from the server or lzc, for swf10 and for dhtml
lzc -g1 --runtime=dhtml main.lzx
lzc -g1 --runtime=swf10 main.lzx
main.lzx:
<canvas width="100%" height="80%">
<include href="lib1.lzx"/>
<include href="lib2.lzx"/>
<foo flavor="vanilla" oninit="this.bar()">
<method name="bar">
Debug.write("This class is from lib1", 'flavor is ', this.flavor);
</method>
</foo>
<bar x="100" y="100" color="yellow" oninit="this.bar()">
<method name="bar">
Debug.write("This class is from lib2", 'color is ', this.color);
</method>
</bar>
<bar x="200" y="100" color="red" oninit="this.bar()">
<method name="bar">
Debug.write("This class is from lib2", 'color is ', this.color);
</method>
</bar>
<bar x="300" y="100" color="green" oninit="this.bar()">
<method name="bar">
Debug.write("This class is from lib2", 'color is ', this.color);
</method>
</bar>
</canvas>
lib1.lzx:
<library>
<class name="foo">
<attribute name="flavor" type="string"/>
<text text="${parent.flavor}"/>
</class>
</library>
lib2.lzx:
<library>
<class name="bar">
<attribute name="color" type="color"/>
<view width="40" height="40" bgcolor="${parent.color}"/>
</class>
</library>
Files:
M WEB-INF/lps/server/src/org/openlaszlo/utils/FileUtils.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF10Compiler.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/DHTMLCompiler.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/ObjectWriter.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/DHTMLWriter.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/FileResolver.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/LibraryWriter.java
M
WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/IntermediateWriter.java
M
WEB-INF/lps/server/src/org/openlaszlo/compiler/ScriptElementCompiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100520-hqm-Q.tar
--
Regards,
Max Carlson
OpenLaszlo.org