This smashes the script compiler to emit _level0 where needed to make
snippets work in swf, but that would need to be conditionalized for
the swf runtime before I check it in, otherwise DHTML runtime will be
broken with references to _level0.classname.
I'm not sure how to do that cleanly at that point in
CommonGenerator.java
Change 20080520-hqm-X by [EMAIL PROTECTED] on 2008-05-20 20:00:16 EDT
in /Users/hqm/openlaszlo/trunk5
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix for swf loadable libraries
New Features:
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
+ put in code in SWFWriter to wrap "with (_level0) { ... }" around
script
blocks written into libraries.
+ modified CommonGenerator to emit references to _level0.<classname>
where it used to emit references
to <classname>
+ added mapping for <import> tag to ClassModel.java:
LFCTag2JSClass.put("import", "LzLibrary");
Tests:
tests in test/snippets in swf
they get broken in DHTML with this patch of course
Files:
M test/snippets/import-class.lzx
M WEB-INF/lps/lfc/kernel/swf/LzLibrary.lzs
M WEB-INF/lps/lfc/kernel/dhtml/LzLibrary.js
M WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/SWFWriter.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/
ImportCompiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080520-hqm-X.tar