Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361865

Summary: widget.equals is not a function
Product: z_Archived Reporter: Brian Svihovec <svihovec>
Component: EDTAssignee: Yun Feng Ma <mayunf>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: greer, mayunf
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch lasher: iplog+

Description Brian Svihovec CLA 2011-10-24 16:09:19 EDT
Create a RUIWidget with the following source:

handler H1 type RUIWidget{targetWidget = button, onConstructionFunction = start, cssFile = "css/P1.css"}

    ui GridLayout{columns = 3, rows = 4, cellPadding = 4, children =[]};
	button Button{};
	button2 Button{};
	var1 widget[] = [button2];
	
    function start()
    	if(var1[1] == this)
    		SysLib.writestdout("here");
    	end
    end
end

When running this sample in Firebug, you will see:

Could not render UI

      ()
      H1.js?contextKey=31:90 ()
      H1.js?contextKey=31:10 ()
      egl.js:871 ()
      H1.html?contextKey=31:80 ([object Array],(function () {egl.localeInfo = {locale: "en_US", nlsCode: "ENU", shortMask: "MM/dd/yyyy", mediumMask: "MM-dd-yyyy", longMask: "MM-dd-yyyy", currencySymbol: "$", decimalSeparator: ".", groupingSeparator: ","};try {egl.handleIDEEvent();egl.rootHandler = new (egl.client.H1);if (egl.rootHandler.targetWidget || !egl.rootHandler.egl$isWidget) {egl.rootHandler.setParent(egl.Document);} else {var package = egl.rootHandler.eze$$package;var typename = egl.rootHandler.eze$$typename;egl.rootHandler = egl.Document;egl.rootHandler.eze$$package = package;egl.rootHandler.eze$$typename = typename;}egl.startup();} catch (e) {egl.crashTerminateSession();if (!egl.client.H1) {egl.println("Internal generation error. Found no definition for client.H1. Try Project > Clean...", e);} else {egl.printError("Could not render UI", e);throw e;}}}))
      H1.html?contextKey=31:54 ()
      H1.html?contextKey=31:52 ([object Event])
      H1.html?contextKey=31:40 


egl.eglx.ui.rui.Widget.equals is not a function
[CRRUI2094E] Here are the EGL function calls leading to this error:

    client/H1.egl() at line 20
    H1.<init>() [native JavaScript]

    () at line 90
egl.eglx.ui.rui.Widget.equals is not a function
P1/client/H1.js?contextKey=31:90
[CRRUI2095E] Could not find the EGL function calls leading to this error
Comment 1 Brian Svihovec CLA 2011-10-24 16:47:34 EDT
This affects the RUI Technical Sample.
Comment 2 Scott Greer CLA 2011-10-31 10:18:31 EDT
eglx/ui/rui/ExternalTypes.egl defines Widget as having equals and not equals, so fixing this is probably a matter of adding a trivial implementation of those two functions to Widget.js.
Comment 3 Yun Feng Ma CLA 2011-11-04 02:30:17 EDT
Created attachment 206444 [details]
Patch

Here is a patch. Thanks.
Comment 4 Yun Feng Ma CLA 2011-11-07 20:04:14 EST
Fixed, add "equals" and "notEquals" to Widget. Thanks.
Comment 5 Brian Svihovec CLA 2011-11-30 13:24:11 EST
Verified and closed in the 20111130 build.