[Laszlo-dev] Semantics of "_instanceAttrs" have been changed?

André Bargull a.bargull at intensis.de
Fri Mar 21 09:15:49 PDT 2008


Bad news:
This application 
"http://labs.openlaszlo.org/trunk-nightly/docs/developers/programs/data_app-$9.lzx?debug=true&lzr=dhtml" 
does not work anymore in dhtml.
Good news:
It does work now in SWF with the recent changes, beforehand it didn't 
work either, but that's another story.

What happens:
LzDataset#construct(..) checks the "_instanceAttrs" property for the 
name of the dataset:
---
    if (this._instanceAttrs['name'] == null) {
        this._instanceAttrs['name'] = 'localdata';
    }
---
AnonDatasetGenerator (in "LzParsedPath.lzs") creates a new dataset 
without any name:
---
function getContext () {
    var d = new LzDataset();//no args -> _instanceAttrs is now undefined!
    var dp = d.getPointer();
    [...]
---

So, beforehand the dataset got the name "localdata" and it was placed on 
the canvas (which is wrong!) through the special dataset name-setter 
magic. Now there is no name, so the setter for that property isn't 
called and the application runs properly (in SWF).

Right now I'm testing a fix for this issue.



More information about the Laszlo-dev mailing list