10781 - Flex - E4X error

Hi,

I have the following code:

{code}
private function assertDetectorNode(xml:XML, ipAddress:String, port:int, remoteID:int):void {
            for each (var detectorNode:XML in xml.children()) {
                assertEquals("entry", detectorNode.localName().toString());
                assertEquals(1, detectorNode.detector.length());
                assertEquals(2, detectorNode.detector[0].children().length());
                assertEquals(1, detectorNode.detector[0].ipAddress.length());
                assertEquals(1, detectorNode.detector[0].port.length());
                assertEquals(1, detectorNode.int.length());

                if (ipAddress == detectorNode.detector[0].ipAddress[0].toString()) {
                    if (port == parseInt(detectorNode.detector[0].port[0].toString())) {
                        if (remoteID == parseInt(detectorNode.int[0].toString())) {
                            return;
                        }
                    }
                }
            }

            fail("No detector mapping node found for IP address '" + ipAddress + "', port '" + port + "' and remoteID '" + remoteID + "'");
        }
{code}

This code compiles fine, but IDEA shows 2 errors ("Property can not be invoked as function") on the "length" property of these 2 lines:

{code}
assertEquals(1, detectorNode.detector[0].ipAddress.length());
assertEquals(1, detectorNode.detector[0].port.length());
{code}

Is this is a known bug?

regards,
Christophe

PS: I tried posting this as a bug on YouTrack, but after filling in all details in the report I got the message that I don't have permission to create issues. Where are we supposed to report issues on the EAP releases?

1 comment
Comment actions Permalink

No, it seems to be new one.

Have you used this url: http://www.jetbrains.net/tracker/issues/IDEA ?

Christophe Herreman wrote:

Hi,

I have the following code:

 private function assertDetectorNode(xml:XML, ipAddress:String, port:int, remoteID:int):void {
>             for each (var detectorNode:XML in xml.children()) {
>                 assertEquals("entry", detectorNode.localName().toString());
>                 assertEquals(1, detectorNode.detector.length());
>                 assertEquals(2, detectorNode.detector[0].children().length());
>                 assertEquals(1, detectorNode.detector[0].ipAddress.length());
>                 assertEquals(1, detectorNode.detector[0].port.length());
>                 assertEquals(1, detectorNode.int.length());
> 
>                 if (ipAddress == detectorNode.detector[0].ipAddress[0].toString()) {
>                     if (port == parseInt(detectorNode.detector[0].port[0].toString())) {
>                         if (remoteID == parseInt(detectorNode.int[0].toString())) {
>                             return;
>                         }
>                     }
>                 }
>             }
> 
>             fail("No detector mapping node found for IP address '" + ipAddress + "', port '" + port + "' and remoteID '" + remoteID + "'");
>         }
> ]]>


This code compiles fine, but IDEA shows 2 errors ("Property can not be invoked as function") on the "length" property of these 2 lines:

 assertEquals(1, detectorNode.detector[0].ipAddress.length());
> assertEquals(1, detectorNode.detector[0].port.length());
> ]]>


Is this is a known bug?

regards,
Christophe

PS: I tried posting this as a bug on YouTrack, but after filling in all details in the report I got the message that I don't have permission to create issues. Where are we supposed to report issues on the EAP releases?

---
Original message URL: http://www.jetbrains.net/devnet/message/5246192#5246192



--
Best regards,
   Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.