| Summary: | Literal in constructors are not generated correctly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Joseph Vincens <jvincens> | ||||
| Component: | EDT | Assignee: | Jeff Douglas <jeffdouglas> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | jeffdouglas, jqian, svihovec | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 205425 [details]
testcase
Perhaps this is an issue with ReorganizeCode -- it seems odd that the literall would be factored out like this.... Joe, I think the number format issue is resolved on 201111210901's build, however, I think there is something not right about the HTML text aren't showing in the row2, column2. If I use sysLib.writeStdout(), it is writing out 12.65 for javascript actually, I reopen this one
the code should be modified to row =3, column = 1
new HTML{text = strlib.formatNumber(p1,"##.##"), layoutData = new
GridLayoutData{ row = 3, column = 1 }
It is printing null, but if it's used by itself in sysLib.writeStdout(strlib.formatNumber(p1, "##.##"), it is printing 12.65
also, if I put the new HTML as a member field of the RUIHandler, it is showing it correctly.
I think there is some issue with ui.children.removeAll or ui.appendChild....
defer this Brian looked into this, seems is still the problem with reorg code. the generated temp variable for "##.##" is declared below when it is used. This is something that I should look into, as Reorg Code is complicated NOT for 070, please wait till after 070 fixed verified |
I will attach a handler to illustrate. in the following function: function setValue(p1 decimal in) ui.children.removeAll(); ui.appendChild(new GridLayout{columns = 1, rows = 6, cellPadding = 0, children =[ Button, new HTML{text = "p1", layoutData = new GridLayoutData{ row = 2, column = 1 } }, // new HTML{text = strlib.formatDate(p1,"MM/dd/yyyy"), layoutData = new GridLayoutData{ row = 2, column = 2 } } new HTML{text = strlib.formatNumber(p1,"##.##"), layoutData = new GridLayoutData{ row = 2, column = 2 } } ]}); end The "##.##" literal is generated after the call to formatNumber.