I think I'm missing something, Adam. Can you explain in a little more
detail? I've got this code:
<node>
<method name="construct" args="p,a">
Debug.write("construct node");
super.construct(p,a);
</method>
</node>
and I'm noting that I don't see "construct node" output on the
console. Whether I'm extending node or a subclass of node doesn't
matter:
<class name="cnode" extends="node"/>
<cnode>
<method name="construct" args="p,a">
Debug.write("construct node");
super.construct(p,a);
</method>
</cnode>
No output here, either. What does node's built-in status have to do
with things?
jim
On Nov 28, 2005, at 8:28 AM, Adam Wolff wrote:
node is a built-in, like view.
http://www.openlaszlo.org/lps-latest/docs/reference/node.html
A
On Nov 28, Jim Grandy wrote:
I'm not sure I'm following you. The first class name is "cnode".
Before that
is a <node> extended with two methods, not a class. There
shouldn't be a
naming conflict in this code.
jim
On Nov 28, 2005, at 8:17 AM, Adam Wolff wrote:
Nope I don't think so. node is reserved. cnode is a subsclass of
LzNode.
it's that crazy node->LzNode mapping bit. I didn't test this, but
expect
this would work as expected if you change the first class name to
something like "bnode".
A
On Nov 23, P T Withington wrote:
Because `construct` is called from the class constructor, before
the
instance
properties are evaluated. This is perhaps poorly explained as
"before any
arguments have been applied". In other words, when `construct`
is called,
your node instance has not yet been constructed enough to have your
overriding
construct method attached to it. You have found a small
loophole in the
instance/class parallelism.
If you want to know when the class constructor is done,
`onconstruct`,
interestingly is sent " right at the end of the instantiation
process"
(not
when the `construct` method is called.
On 23 Nov 2005, at 16:18, Jim Grandy wrote:
Why don't I see "construct node" in the debugger output of the
following
LZX
program?
<canvas debug="true">
<node>
<method name="construct" args="p,a">
Debug.write("construct node");
super.construct(p,a);
</method>
<method name="init">
Debug.write("init node");
super.init();
</method>
</node>
<class name="cnode" extends="node">
<method name="construct" args="p,a">
Debug.write("construct cnode");
super.construct(p,a);
</method>
<method name="init">
Debug.write("init cnode");
super.init();
</method>
</class>
<cnode/>
</canvas>
Output:
construct cnode
init node
init cnode
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user