You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Kinjal (JIRA)" <ji...@apache.org> on 2016/02/22 09:50:18 UTC

[jira] [Comment Edited] (FLEX-35033) State Transition issue in FlexJS

    [ https://issues.apache.org/jira/browse/FLEX-35033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15156605#comment-15156605 ] 

Kinjal edited comment on FLEX-35033 at 2/22/16 8:49 AM:
--------------------------------------------------------

Below code also throw error while conversion

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("T");
			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));
			}
			return newDate;

And the error i am getting is 

Access of possibly undefined property date.
                                newDate.date = Number(split[1].substr(0, 2));
                                        ^

D:\Work\Prominic\TestFlexJSTable\src\MyController.as:151
Access of possibly undefined property minutes.
                                newDate.minutes = Number(split[1].substr(2, 2));

                                        ^

D:\Work\Prominic\TestFlexJSTable\src\MyController.as:152
Access of possibly undefined property seconds.
                                newDate.seconds = Number(split[1].substr(4, 2));



was (Author: kinjalpatel):
Below code also throw error while conversion

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("T");
			/*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));
			}*/
			return newDate;

And the error i am getting is 

Access of possibly undefined property date.
                                newDate.date = Number(split[1].substr(0, 2));
                                        ^

D:\Work\Prominic\TestFlexJSTable\src\MyController.as:151
Access of possibly undefined property minutes.
                                newDate.minutes = Number(split[1].substr(2, 2));

                                        ^

D:\Work\Prominic\TestFlexJSTable\src\MyController.as:152
Access of possibly undefined property seconds.
                                newDate.seconds = Number(split[1].substr(4, 2));


> State Transition issue in FlexJS
> --------------------------------
>
>                 Key: FLEX-35033
>                 URL: https://issues.apache.org/jira/browse/FLEX-35033
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: States
>    Affects Versions: Apache FlexJS 0.5.0
>         Environment: FlexJS
>            Reporter: Kinjal
>             Fix For: Apache FlexJS 0.6.0
>
>         Attachments: FlexJSDataGridExample.zip
>
>
> State transition is not working in FlexS.It creates swf but it failes at conversion from As/Mxml to JS/Html.
> I have used asjsc command to command for conversion and getting error in Terminal as well as in CMD.
> SolidBackgroundBead  is also failed at conversion.
> Please find below link of my demo project.
> https://www.dropbox.com/home?preview=FlexJSDataGridExample.zip
> Getting below error
> java.lang.ClassCastException: org.apache.flex.compiler.internal.tree.mxml.MXMLPr
> opertySpecifierNode cannot be cast to org.apache.flex.compiler.tree.mxml.IMXMLIn
> stanceNode
>         at org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSEmitt
> er.emitInstanceOverride(MXMLFlexJSEmitter.java:1421)
>         at org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSEmitt
> er.emitInstance(MXMLFlexJSEmitter.java:1100)
>         at org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker.visitI
> nstance(MXMLBlockWalker.java:246)
>         at org.apache.flex.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(
> MXMLNodeSwitch.java:123)
>         at org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(M
> XMLBlockWalker.java:149)
>         at org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSEmitt
> er.emitArray(MXMLFlexJSEmitter.java:1679)
>         at org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker.visitA
> rray(MXMLBlockWalker.java:286)
>         at org.apache.flex.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(
> MXMLNodeSwitch.java:72)
>         at org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(M
> XMLBlockWalker.java:149)
>         at org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSEmitt
> er.emitPropertySpecifier(MXMLFlexJSEmitter.java:1569)
>         at org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker.visitP
> ropertySpecifier(MXMLBlockWalker.java:254)
>         at org.apache.flex.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(
> MXMLNodeSwitch.java:105)
>         at org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(M
> XMLBlockWalker.java:149)
>         at org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSEmitt
> er.emitDocument(MXMLFlexJSEmitter.java:200)
>         at org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSBlock
> Walker.visitDocument(MXMLFlexJSBlockWalker.java:69)
>         at org.apache.flex.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(
> MXMLNodeSwitch.java:84)
>         at org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(M
> XMLBlockWalker.java:149)
>         at org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSBlock
> Walker.visitFile(MXMLFlexJSBlockWalker.java:61)
>         at org.apache.flex.compiler.internal.visitor.mxml.MXMLNodeSwitch.handle(
> MXMLNodeSwitch.java:90)
>         at org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker.walk(M
> XMLBlockWalker.java:149)
>         at org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker.visitC
> ompilationUnit(MXMLBlockWalker.java:168)
>         at org.apache.flex.compiler.internal.codegen.mxml.MXMLWriter.writeTo(MXM
> LWriter.java:66)
>         at org.apache.flex.compiler.clients.MXMLJSC.compile(MXMLJSC.java:458)
>         at org.apache.flex.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:346
> )
>         at org.apache.flex.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:271)
>         at org.apache.flex.compiler.clients.MXMLJSC.staticMainNoExit(MXMLJSC.jav
> a:230)
>         at org.apache.flex.compiler.clients.MXMLJSC.main(MXMLJSC.java:176) 
> File not found: org.apache.flex.html.beads.SolidBackgroundBead
> :
> : java.lang.RuntimeException: Unable to find JavaScript filePath for class: org.apache.flex.html.beads.SolidBackgroundBead
> : at org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:176)
> : at org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:210)
> : at org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:210)
> : at org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:210)
> : at org.apache.flex.compiler.internal.graph.GoogDepsWriter.buildDB(GoogDepsWriter.java:128)
> : at org.apache.flex.compiler.internal.graph.GoogDepsWriter.getListOfFiles(GoogDepsWriter.java:80)
> : at org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSPublisher.publish(MXMLFlexJSPublisher.java:330)
> : at org.apache.flex.compiler.clients.MXMLJSC.compile(MXMLJSC.java:467)
> : at org.apache.flex.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:346)
> : at org.apache.flex.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:271)
> : at org.apache.flex.compiler.clients.MXMLJSC.staticMainNoExit(MXMLJSC.java:230)
> : at org.apache.flex.compiler.clients.MXMLJSC.main(MXMLJSC.java:176) 



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