Archive for December, 2006

Tools for Porting 3.x Applications to 4.0B1

Monday, December 25th, 2006

Going from a working Open Laszlo 3.x application to a blank screen in 4.0 can be frustrating; what do you do once you've downloaded and installed the new server, and your app just doesn't show up? This handy guide should help you get your app to appear.

  1. Eliminate any errors or warnings that appear when compiling or running your app in the version of OL you had previously developed with, in the flash runtime of course.
  2. Eliminate compilation errors or warnings in the flash runtime in OL4B1. (lzr=swf8)
  3. Run in the flash runtime with debug=true. Eliminate any warnings or errors that appear in the Open Laszlo debugger. lzr=swf8&debug=true
  4. Replace any swf resources with stand-in png's. (Don't go through a laborious swf to bitmap conversion yet; just use some medium-sized png's you have sitting around.)
  5. Eliminate any <font src="foo.ttf"/> tags.
  6. Now run in Firefox 2 with lzr=dhtml. (It probably won't work on the first try.) Same as above, eliminate compilation errors and warnings, then runtime errors and warnings.
  7. Install Firebug! Firebug is a totally crucial DHTML debugger. As of this writing, we're using 1.0b7. It's subtle though; it installs itself as disabled. Right-click on the little red x or green check in the bottom-right corner of the status bar, and select "Enable Firebug."
  8. Run your app with firebug enabled. Firebug will almost certainly detect errors. Click on the Firebug error count to bring up the Firebug console. The console shows you the "compiled" javascript code, not your lzx source, so you have to be clever to find out where that code is actually coming from. It might be in the LFC, not your code; then you have to figure out where your code is invoking that part of the LFC. Usually you can fix these errors by taking out calls to unsupported API's or adding a check for null. (See the release notes on dereferencing null pointers.)
  9. Use the "Net" tab in Firebug to monitor network traffic. Fix any 404s.
  10. Cycle through running with Firebug, the OL DHTML debugger, and the OL swf debugger, eliminating errors and warnings until there aren't any more, while still making sure that you haven't broken the swf code. Your app should start to appear at this point.
  11. Try running your app in the browser of your choice; for the best experience, stick to Firefox and IE7. Everything should work in IE6 and Safari, too. (list of supported browsers.)
  12. Still hosed? Read the release notes, consult the laszlo-user and laszlo-dev lists, ask a question in the forums.
  13. Find a bug? Great, we love bugs. Check the bug database to see whether someone else has reported it, and if not, file a bug.

Hope this helps; let us know if you get stuck... and thanks for trying us out.

OL4 B1 Candidate available

Thursday, December 21st, 2006

“Legals” becomes OL4; Beta approaching

Monday, December 18th, 2006