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

Bug 362155

Summary: Dojo/RUI Widget got JavaScriptGen error when event added
Product: z_Archived Reporter: Xin Wu <cdlwuxin>
Component: EDTAssignee: Scott Greer <greer>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: cdlwuxin, greer, hjiyong, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Xin Wu CLA 2011-10-27 02:55:22 EDT
Build Identifier: 20111026 nightly build

Most Dojo Widget got JavaScriptGen error

Reproducible: Always

Steps to Reproduce:
1. Create new Web Client Project
2. Create new RUI Handler and open in VE design view
3. Drag & Drop some dojo widget, and switch to preview. Nothing rendered.
4. Open in browser, you may see JSGen error
Comment 1 Xin Wu CLA 2011-10-27 02:55:52 EDT
It is a regression bug.
Comment 2 Xin Wu CLA 2011-10-27 03:07:18 EDT
Additional information

When event added to RUI/Dojo widget, the JSGen got error.
Comment 3 Scott Greer CLA 2011-10-27 09:08:06 EDT
I believe this is likely due to a change that Jeff made to support new behaviors in ReorganizeCode in support of appending to arrays.  If so, I already have a local fix that I will commit later today.
Comment 4 Huang Ji Yong CLA 2011-10-27 09:42:12 EDT
Hi Scott,
I think you're right.
The cause of this problem is that
The "::=" operator is reorganized to "="

You can test your fix with this simple test case.

handler tdd type RUIhandler{ initialUI = [ Button ] }
	Button DojoButton{ text = "Button", onClick ::= Button_onClick };
	
    function start()    	
    end    
    
    function Button_onClick(event Event in)
    	syslib.writeStdout("test");
    end
end

(In reply to comment #3)
> I believe this is likely due to a change that Jeff made to support new
> behaviors in ReorganizeCode in support of appending to arrays.  If so, I
> already have a local fix that I will commit later today.
Comment 5 Scott Greer CLA 2011-10-27 14:44:05 EDT
Justin and I confirmed the "fix" works with a fairly complex app (MortgageCalculator), so I'm committing the change now.
Comment 6 Xin Wu CLA 2011-10-27 23:00:00 EDT
Verified in build 20111027