Change 20080813-dda-W by [EMAIL PROTECTED] on 2008-08-13 11:27:57 EDT
in /Users/dda/laszlo/src/svn/openlaszlo/trunk-b
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: SWF9: change top level application class inheritance
New Features:
Bugs Fixed: LPP-6781 (swf9 global confusion: x, y, declared as Number?)
Technical Reviewer: ptw (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
This changeset changes the inheritance structure so that the
LzApplication class
(containing user code) does not indirectly inherit from the as3
Sprite class.
Sprite has data members 'x', 'y' (and several others) that would
otherwise pollute
the user's application namespace and prevent the use of these as
variable names.
However, a Sprite-inherited class is needed as the top level
class that is executed
in the flex program. The solution is to leave LzApplication in
place as the 'holder'
for user code, but to create the LzApplication from a barebones
Sprite-inherited class,
that we call 'LzSpriteApplication'.
The barebones generated class is this:
public class LzSpriteApplication extends Sprite {
private var app:LzApplication;
public function LzSpriteApplication() {
app = new LzApplication(this);
}
}
and the LzApplication/LFCApplication constructor gets the sprite
and makes it
available for use as needed.
Tests:
SWF8,DHTML: smokecheck, weather, lzpix
SWF9: hello, weather, lzpix, application reported in LPP-6781
Files:
M WEB-INF/lps/lfc/kernel/swf9/LFCApplication.as
M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/
SWF9ParseTreePrinter.java
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080813-dda-W.tar
--
Don Anderson
Java/C/C++, Berkeley DB, systems consultant
voice: 617-547-7881
email: [EMAIL PROTECTED]
www: http://www.ddanderson.com