Community
Participate
Working Groups
Test case attached. The error message: Could not render UI [CRRUI1055E] The null child cannot be added to the [CRRUI1050E] The DIV variable must include the word "null". variable. [CRRUI2094E] Here are the EGL function calls leading to this error: Div.Widget.getTagName() [native JavaScript] Div.Widget.appendChild() [native JavaScript] org/eclipse/edt/rui/widgets/TreeNode.egl() at line 72 Uncaught [type=eglx.lang.AnyException, message=[CRRUI1055E] The null child cannot be added to the [CRRUI1050E] The DIV variable must include the word "null". variable.] testWidget/client/testTree.html?contextKey=146:90 [CRRUI2095E] Could not find the EGL function calls leading to this error ------------- The error is caused by the generation of TreeNode.egl line 72 childrenContainer.appendChild(child); The generated code is this.childrenContainer.appendChild(egl.eglx.lang.EAny.ezeCast(child, egl.eglx.ui.rui.Widget)); In which egl.eglx.lang.EAny.ezeCast returns a null value. (the function is defined in BaseTypesAndRuntimes.js, so maybe we have to change js runtime)
Created attachment 204176 [details] Testcase
Scott has started to do this bug, so assign it back to him
Created attachment 206386 [details] widget change This test case can be simplified to div Div{}; function start() buttons any[] = [new Button{text = "button"}]; addChild(buttons[1]); end function addChild(child any in) div.appendChild(child); end The problem happens when the function parameter is any type, and the argument is from a any array. Since I can update the TreeNode.egl to bypass this defect, and this defect is not common and blocking, so I downgrade the severity.
This bug may be the same as bug 358996
Created attachment 206923 [details] Fix for the js problem The literal in the any type array is boxed now.
Fixed. The literal in the any type array is boxed now.
Verified in build 201111160901