[Laszlo-dev] still confused about referencing node id's from methods
Henry Minsky
henry.minsky at gmail.com
Tue Apr 1 08:25:56 PDT 2008
This code
<view id="v1" width="100" height="20" bgcolor="red"/>
<view id="v2" width="100" height="20" y="100" x="${v1.x + v1.width + 20}"
bgcolor="blue"/>
compiles to a constraint method:
$lzc$bind_x$v2_$m10:
function ($lzc$ignore = null) {
this.setAttribute("x", v1.x + v1.width + 20);
}
$lzc$dependencies_x$v2_$m10:
function () {
return [v1, "x", v1, "width"]
}
But nodes which have id's set them on the "global" object. So how can we
expect these references to work? Did we decide we need
to put with (global) {...} around all method bodies? Or have the compiler
find all id's at compile timeand make real top level vars for them?
--
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/e6347ae0/attachment.html
More information about the Laszlo-dev
mailing list