| Summary: | JS: AS operator not casting from index of any[] into record during assignment | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Will Smythe <smythew> | ||||||
| Component: | EDT | Assignee: | Huang Ji Yong <hjiyong> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | critical | ||||||||
| Priority: | P1 | CC: | hjiyong, svihovec, tww | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 207126 [details]
fix
Change ArrayTypeTemplate to fix array to any type array conversion Looks good. |
Created attachment 207120 [details] RUI handler demonstrating the problem I thought this defect was already known, but can't find it. The issue can be seen in the attached handler code. I am doing a fairly simple cast from the selected row in a grid (grid.getSelection(), which returns an any[]) into a concrete record type (Customer). Although debug shows the array returned by getSelection() is correct, I cannot assign this any into a Customer. Here is an example of the problem: sels any[] = grid.getSelection(); // in debug, sels[] correct contains the selected Customer record c1 Customer = sels[1] as Customer; // c1 is an empty record (PROBLEM) - fields never getting assigned any values