Laszlo
External
xxx
Ways to Compile
Compiling is what you do for SOLO deployment
- <canvas proxied="false">
- Fetch your URL from the server as foo.lzx?lzproxied=false
- SOLO docs according to the person who makes them
- Stand alone compiler
Laszlo does have a standalone compiler, called lzc.
The compiler resides in the directory:
$LPS_HOME/WEB-INF/lps/server/bin
Invoke the compiler with the command:
lzc filename.lzx
This will result in creation of the file:
filename.swf
Escaping Code
// CDATA method
<!CDATA[
this is a < test. <br> br before this
]]>
// & method
this is a < test. <br> br before this
Getting Started
- Verify Installation Works
- Interactive Coding
- Stand Alone Deployment
Stand Alone Deployment
- Copy this Example to the file name
soloTest.lzx in your work directory.
- Bring it up in the compiler via a link like this:
http://localhost:8080/lps-3.0.2/my-apps/work/soloTest.lzx
- Look in the
work directory and find the file soloTest.lzx.swf, this is the flash file you can deploy any where.
- You can embed the
.swf in an html page as shown in this Example
- Note: For me loading the
.swf file on the development machine causes IE to look like it never finishes loading. I don't have this problem on other machines.
soloTest.lzx
<canvas proxied="false">
<text>This is in a .swf file</text>
</canvas>
soloTest.html
<html>
<head>soloTest</head>
<body>
<object type="application/x-shockwave-flash" data="soloTest.lzx.swf" width="100" height="250" ID="Shockwaveflash1" VIEWASTEXT>
<param name="movie" value="soloTest.lzx.swf" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="salign" value="LT" />
<param name="menu" value="false" />
</object>
</body>
</html>
Interactive Coding
- Determine where your work directory is (this was created in the previous activity Verify Installation Works)
- Put a simple program there, such as this Example Simple with a file name like this
simple.lzx
- Try working with it at a URL like this http://localhost:8080/lps-3.0.2/laszlo-explorer/editor.jsp?src=my-apps/work/simple.lzx
Example Simple
<canvas>
<text>Simple Test</text>
</canvas>
Verify Installation Works
- Download the openlaszlo development environment.
- Install it to the default location.
- Start the OpenLaszlo Server Start | OpenLaszlo Server | Start OpenLaszlo Server
- The Start menu should include a short cut to the directory you will develop in (it is called
My Apps.
- I made a sub dir there called
work to work in. For me it's path is
C:\Program Files\OpenLaszlo Server 3.0.2\Server\lps-3.0.2\my-apps
- Put a test file there (I copied the one from the
My Apps directory work and changed the text string in it)
- Verify the server is working correctly by going to this url (note that it ends in the name of the test file)
http://localhost:8080/lps-3.0.2/my-apps/work/copy-of-hello.lzx
- You can now start working with your own Laszlo code.