We still want to have "nodeType", because the data-classes were modeled
on the W3C-DOM specification:
"http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-1950641247".
If LPP-5840 was implemented, or if we were able to code js2
getters/setters, there wouldn't be any problems for AS3...
The as3 XML dom nodes have a node.nodeKind() method, which gets the type string.
On Sat, Jul 19, 2008 at 12:36 PM, Henry Minsky
<hminsky at laszlosystems.com
<http://www.openlaszlo.org/mailman/listinfo/laszlo-dev>> wrote:
>/ Maybe I should be using instanceof at this point? There's not much
/>/ point in having nodeType anymore
/>/ I guess.
/>/
/>/
/>/ On Sat, Jul 19, 2008 at 10:31 AM, Donald Anderson <dda at ddanderson.com
<http://www.openlaszlo.org/mailman/listinfo/laszlo-dev>> wrote:
/>>/ I think the problem is that 'LzDataNodeMixin' as a type becomes an
/>>/ interface,
/>>/ and interfaces can have no data members. When LzDataNodeMixin is mixed
into
/>>/ a class, you get the data elements, but none of them can be seen externally
/>>/ (through the interface).
/>>/ On Jul 19, 2008, at 9:20 AM, Henry Minsky wrote:
/>>/
/>>/ I've got this code which gets a flex compiler error when compiling in
/>>/ swf9:
/>>/
/>>/ public static function xmlrpc2jsobj (node:LzDataNodeMixin):* {
/>>/ if ( node.nodeType == LzDataElement.TEXT_NODE ){
/>>/
/>>/
/>>/ org.openlaszlo.sc.CompilerError: line unknown: Error: Access of
/>>/ possibly undefined property nodeType through a reference with static
/>>/ type LzDataNodeMixin, in line: if ($1.nodeType ==
/>>/ LzDataElement.TEXT_NODE) {
/>>/
/>>/ Why does it not let me reference the nodeType of my 'node'? What is a
/>>/ "static type"?
/