Hello list,

I've been meaning to share my experiences porting a decent sized OL project to SWF recently. Once i got around some pratfalls that weren't listed on the wiki, i completely enjoy using SWF9 for application development. All the speed and extra type checking i could hope for, and i think the team has found a wonderful balance in the transition. That said, here's the list of things that i needed to know to successfully port to SWF9 from SWF8 that i'd like to repeat for the list, since i didn't find it in the "runtime differences" wiki entry on the openlaszlo.org wiki.

FIRST - if you download the debugger version of SWF9 from adobe's site, you will be able to see all the runtime errors that i didn't know i could even trap until after this list was made. Find it, download it, use it! When i say "bombed silently" below, i mean that i couldn't find it (without the debugger)

These are random road block I hit that took a lot of time; i hope it saves someone the same:

- all old style setAttr(val) style calls are changed to setAttribute(attr, val)
  across the whole project

- all methods that are also used for delegates have a single dummy
  argument, 'true' passed as as3 requires across the whole project

- found out that for loops in script tags can cause silent infinite
  loops, so converted all script tags into nodes with methods across
  the whole project. Script tags and SWF9 are not a good combination

- found out that expressions that resolve to *objects* (not object attributes) in an attribute
  must use the "once" constraint type, not the erroneous ${} active
  constraint syntax. changed across the whole project

- (a few of the fields that used not to be clickable are all of the
  sudden -- need to look into that)

- Used try catch to isolate and report the most egregious of the errors
i encountered (try and catch were not so important when the debugger caught everything)

- Handlers will also cause the runtime to bomb silently if the
  reference attribute is pointed at a nonexistant thing

- If a handler references something
  that has not been inited at the time it's evaluated for the first
  time, the runtime will bomb silently.

best,

.j


Reply via email to