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

Bug 356992

Summary: Assigning a delegate to an array element uses a period instead of comma
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javascriptgen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-09-07 14:47:55 EDT
generated code is 

egl.checkNull(runTestMtds)[runTestMtds.checkIndex(1 - 1)] = egl.client.BasicTester['$inst'].new egl.egl.jsrt.Delegate(egl.client.BasicTester['$inst'],egl.client.BasicTester.prototype.runTestTypeFunctions01);

change the period before new to a comma and it works

1. create a rui project
2. define a library named Basics
package client;

library Basics
	function executeLibTest()
		testMethods String[] = ["runTestTypeFunctions01", "runTestTypeFunctions02", "runTestTypeFunctions03"];
		runTestMtds runTestMethod[] = new runTestMethod[3];
		runTestMtds[1] = BasicTester.runTestTypeFunctions01;
		runTestMtds[2] = BasicTester.runTestTypeFunctions02;
		runTestMtds[3] = BasicTester.runTestTypeFunctions03;
	end
end

delegate runTestMethod()	
end
3. define a library named BasicTester
package client;

// basic library
library BasicTester
	
	function runTestTypeFunctions01()
		syslib.writestdout("runTestTypeFunctions01");
	end
	function runTestTypeFunctions02()
		syslib.writestdout("runTestTypeFunctions02");
	end
	function runTestTypeFunctions03()
		syslib.writestdout("runTestTypeFunctions03");
	end
end
4. define a RUI handler
package client;

handler Driver type RUIhandler {initialUI = [  ],onConstructionFunction = start, cssFile="css/MiniBasic.css", title="Driver"}
    function start()
            syslib.writestdout(" I'm here ");
            Basics.executeLibTest();
    end    
end
5. Deploy the project and check Basics.js in the deployed project for syntax errors
Comment 1 Kathy Carroll CLA 2011-09-23 09:49:25 EDT
No longer get syntax issue
Comment 2 Kathy Carroll CLA 2011-09-23 09:50:49 EDT
verified with 201109230902
Comment 3 Lisa Lasher CLA 2011-10-11 16:30:28 EDT
Closing this defect.