[Laszlo-dev] The swf kernel is bypassing object construction.

Henry Minsky henry.minsky at gmail.com
Tue Apr 1 10:29:55 PDT 2008


We shouldn't need to port any of the LzLoader stuff.
We have LzHTTPLoader, which is the cross platform XML data loader, and it
has runtime-specific kernel routines it calls to translate nativeXML object
s into LFC LzDataXXX objects. The kernel classes are  LzXMLTranslator   and
LzXMLParser. LZXMLParser is responsible for converting strings to native XML
objects , and LzXMLTranslator copies a native XML object to LZDataElement
tree.



On Tue, Apr 1, 2008 at 1:18 PM, P T Withington <ptw at openlaszlo.org> wrote:

> 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
> >
> >
>


-- 
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20080401/a39cf6dc/attachment.html


More information about the Laszlo-dev mailing list