flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Harui (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLEX-35041) Date property not working in FlexJS
Date Fri, 18 Nov 2016 05:17:58 GMT

     [ https://issues.apache.org/jira/browse/FLEX-35041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alex Harui resolved FLEX-35041.
-------------------------------
       Resolution: Fixed
         Assignee: Alex Harui
    Fix Version/s: Apache FlexJS 0.8.0

Appears to be fixed.

> Date property not working in FlexJS
> -----------------------------------
>
>                 Key: FLEX-35041
>                 URL: https://issues.apache.org/jira/browse/FLEX-35041
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: FlexJS
>            Reporter: Kinjal
>            Assignee: Alex Harui
>             Fix For: Apache FlexJS 0.8.0, Apache FlexJS 0.5.0
>
>
> Below code throw error in conversion from MXML to JS.This code works fine in swf.
> var newDate:Date = new Date(Number(_xmlString.substr(0, 4)), Number(_xmlString.substr(4,
2)), Number(_xmlString.substr(6, 2)));
> var split:Array = _xmlString.split(" ");
> if (split.length > 1)
> { newDate.date = Number(split[1].substr(0, 2)); newDate.minutes = Number(split[1].substr(2,
2)); newDate.seconds = Number(split[1].substr(4, 2)); }
> And the error i am getting is
> Access of possibly undefined property date.
> newDate.date = Number(split[1].substr(0, 2));
>                ^
> Access of possibly undefined property minutes.
> newDate.minutes = Number(split[1].substr(2, 2));
>                 ^
> Access of possibly undefined property seconds.
> newDate.seconds = Number(split[1].substr(4, 2));
>                 ^



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message