[Laszlo-dev] The swf kernel is bypassing object construction.
P T Withington
ptw at openlaszlo.org
Tue Apr 1 10:18:54 PDT 2008
This is all low-level AS2-specific hacks that are non-portable. We
either need to excise this code or rewrite it portably.
On 2008-03-31, at 17:05 EDT, Philip Romanik wrote:
> LzLoader in the swf kernel constructs LzDataText and LzDataElement
> objects directly. I tried to use 'new' but there is some kind of
> recursion because the app I'm using (amazon) crashes. This is the
> source of the regression I am seeing because some variables are
> initialized in the constructor now to prevent swf9 compiler errors.
>
> I can workaround the issue by defining the initial values in the hash.
>
> For example, I changed this line,
>
> lfcnode = {__proto__: LzDataText.prototype, data: nv,
> parentNode: lfcparent};
>
> to
>
> lfcnode = {__proto__: LzDataText.prototype, data: nv,
> parentNode: lfcparent, nodeType: LzDataNode.TEXT_NODE};
>
>
> I can also conditionally define the variables in LzDataElement and
> LzDataText, ie: in LzDataText,
>
> if (!$swf9) {
> var nodeType = LzDataNode.TEXT_NODE;
> }
>
> Any thoughts on this?
>
> Thanks!
>
> Phil
>
More information about the Laszlo-dev
mailing list