flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [1/2] git commit: [flex-asjs] [refs/heads/develop] - - Fix not working numElements - Fix failing internalChildren function when element is undefined
Date Thu, 09 Feb 2017 16:34:18 GMT


On 2/9/17, 3:36 AM, "Piotr Zarzycki" <piotrzarzycki21@gmail.com> wrote:

>Guys,
>
>If anyone is seeing some problems with this let me know. When I started to
>use numElements without those fix it didn't work.
>
>>@@ -231,7 +231,7 @@ package org.apache.flex.core
>>                  */
>>                 public function $numElements():int
>>                 {
>> -                       return super.numElements();
>> +                       return super.numElements;
>>                 }

Hmm.  I thought the Compiler knew to report an error there.  Oh well, good
catch.

>> @@ -799,6 +799,8 @@ package org.apache.flex.core
>>          COMPILE::JS
>>          public function internalChildren():Array
>>          {
>> +            if (!element) return [];
>> +
>>              return element.childNodes as Array;
>>          }
>>

I would be interested to know why internalChildren got called without an
element.  Elements get created pretty early.

-Alex

Mime
View raw message