Hi List!
Here is a mail, that has become a little bit larger than expected. If
you did not had any problems porting OL 4.0.xx applications to OL 4.3.0
you can possibly stop reading now. But if you experienced problems or
are one member of the development team you might be interested in some I
wrote below.
I tried to port my Application - it is (was) written in OL 4.0.11
conform code and I referred to the page
http://wiki.openlaszlo.org/Runtime_Differences#4.2_Migration_Script to
migrate my code to OL 4.3.0 conform code (should be the same as 4.2.0,
right?).
This message to the board is a guideline on how to evade certain
problems I have encountered... maybe it is useful to other programmers.
In addition this Mail is supposed to raise attention on some probs that
are not very well documented :)
Well, what have I done? My Steps:
1. I ran the convert_required.pl migration script.
2. I ran the convert_setters.pl migration script.
So far, so good: The necessary changes had been made. But then I
encountered a problem, which I solved manually - but I think it could be
automatated in the Perl-Script:
3. I changed all the used Color-Keywords (like "black", "white",
"green", ...) in the Tag-Descriptions and the setters
(setAttribute('fgcolor',...), etc.) to their Hex-Values: black --> 0x0,
white --> 0xFFFFFF, and so on. I am pretty sure this could be done by
the perl script, but I have no idea about perl... or maybe there is
another way?
That last Step eliminated all the remaining errors I had before my
program started (it killed all the error messages in the debug-window
before my inital "Program startet..." Debug-Message appears *Wohoo*).
4. I went through my code updating all the lines of my code that were
instantiating self written classes. I added "lz." in front of the first
few classes my program encounters. I am pretty sure this work can be
done by one of the perl scripts above too - just scan the class for
appeareances of the sting "new *" and replace all occurences of "new *"
with "new lz.*". Should that do the trick or am I missing side effects?
5. I am using a red5-rtmp-connections (rtmps actually) including
NetRemoteCalls. The netremotecall-Class is missing completely in the OL
4.3 and in the OL 4.2 release - too bad. So I am using Sebastian
Wagner's Code from an older Mail to the Laszlo-User-Mailing-List ("Re:
[Laszlo-user] OL 4.2: NetRemotecalls annihilated?" from Sebastian Wagner
send on Feb the 2nd of 2009). Works fine after one tiny little change:
in the method "registerMethods" the line "var t = hib;" has to be
deleted or commented - it does not do anything (that I could see :) ).
6. I have many calls to servlets in my code. One of the functions I used
frequently is the OL 4.0.11 method "dataset.setQueryType(...)". This
method is deprecated, but not changed by the perl script - should be
easy to change that. It works currently for example for the "setSrc(..)"
function of the dataset-class.
So far my experiences - please contact me if you need to know details.
And here are my Questions:
1. What happened to the "id"-Tags? Every object I referred to by the
object's id could not be found anymore - the call points to an undefined
object. As up now I have to relate directly to my used objects - but I
miss that feature badly and I am sure this had not be abandoned!
2. Could be related to the first question: When I use the expression
"foo = new lz.Delegate(...)" I can not call that "foo" link to the
actual object later in the code - it points to an undefined object.
Could that be abandoned as well?!
Ok - I hope I did'nt spread confusion - it may be I missed out some
JavaScript Basics, because I am relatively new to that language...
Can anybody answer the questions above?
Kind regards
Tim