Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356992 - Assigning a delegate to an array element uses a period instead of comma
Summary: Assigning a delegate to an array element uses a period instead of comma
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-07 14:47 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:14 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.