Go Back   OpenLaszlo Developers Forums > Programming in OpenLaszlo > General OpenLaszlo Programming

General OpenLaszlo Programming Questions and discussions about coding in OpenLaszlo. Please include the release of OpenLaszlo you are developing in.

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-01-2008, 07:26 AM
rcyeager rcyeager is offline
New User
 
Join Date: Dec 2005
Posts: 1,031
rcyeager is on a distinguished road
4.0.12 to 4.1 migration tips

Without trying to avoid dups of items already documented (http://wiki.openlaszlo.org/Runtime_Differences), here are the changes I had to make to upgrade my apps from 4.0.12 to 4.1:

The HTML embed API has changed. Change Lz.swfEmbed() to lz.embed.swf() in your wrapper page. Ditto for DHTML embedding.

Anywhere you have Javascript that invokes the "Lz" object, change them to "lz.embed". For example, Lz.iframemanager becomes lz.embed.iframemanager. Also, note that Lz.__BrowserDetect is now lz.embed.browser.

I usually don't overwrite web.xml b/c I have some custom stuff in mine. I noticed the 4.1 web.xml is drastically different, so I merged in the changes.

I received a compiler error because I had views named "private" and "public". The trick was that the compiler did not spit out which filename/linenumber, so it took a while to find this. Once found, changing the view names solved the issue.

Had to grep through all the code looking for "new" to add the lz namespace for my classes. I also did it for OL classes without Lz starting the name, such as lz.edittext and lz.simplelayout. Dunno if that is right yet, but it seems to work. Same thing for "instanceof".

Changed all "obj.setXXX()" calls to "obj.setAttribute("XXX", v). Such as changing obj.setVisible() to obj.setAttribute("visible", val);

Replaced all "obj.getXXX()" calls with "obj.XXX", such as obj.geWidth() to obj.width

Had to change all occurrences of "apply" to "applied" as it relates to states. Do a grep for the word "apply" to catch them all.

Where a delegate calls a method, if the method had no arguments I had to add a dummy argument. This seems to actually involve the most code changes, at least for my code.

Anywhere where a method used the old event handling syntax, had to create a new handler that then called the method.

Changed LzDataNode.stringToLzData() to LzDataElement.stringToLzData()

Removed <datasource> b/c it no longer exists

Changed references of "ConstructorMap" to "lz"

I had <import> libraries in my code that used UIDs like "13de9abc7ff54d0286d99149583c0902" as id's. 4.1 would not compile these, so I had to add a string literal in front of the identifier.

This list is being edited as I finish my migrations...

Robert Yeager
http://www.qrowd.com
http://www.cooqy.com

Last edited by rcyeager; 07-02-2008 at 01:41 PM.
Reply With Quote
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 10:56 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.