Home   Notes   Contact Me

Laszlo

External


xxx


Ways to Compile

Compiling is what you do for SOLO deployment

For a tutorial introduction to SOLO deployment, please see Tutorial part 1 Tutorial part 2 More in depth discussion
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 &lt; test. &lt;br&gt; br before this

Getting Started

  1. Verify Installation Works
  2. Interactive Coding
  3. Stand Alone Deployment

Stand Alone Deployment

  1. Copy this Example to the file name soloTest.lzx in your work directory.
  2. Bring it up in the compiler via a link like this:
    http://localhost:8080/lps-3.0.2/my-apps/work/soloTest.lzx
  3. Look in the work directory and find the file soloTest.lzx.swf, this is the flash file you can deploy any where.
  4. You can embed the .swf in an html page as shown in this Example
  5. 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

  1. Determine where your work directory is (this was created in the previous activity Verify Installation Works)
  2. Put a simple program there, such as this Example Simple with a file name like this simple.lzx
  3. 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

  1. Download the openlaszlo development environment.
  2. Install it to the default location.
  3. Start the OpenLaszlo Server Start | OpenLaszlo Server | Start OpenLaszlo Server
  4. The Start menu should include a short cut to the directory you will develop in (it is called My Apps.
  5. 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
  6. Put a test file there (I copied the one from the My Apps directory work and changed the text string in it)
  7. 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
  8. You can now start working with your own Laszlo code.