Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356987 - Basic Handler produces invalid JS code
Summary: Basic Handler produces invalid JS code
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-07 14:32 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:19 EST (History)
1 user (show)

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:32:24 EDT
Create a Web project MiniHandler
===== Create a basic handler  ====
package client;

handler crudeHandler 
	function actionOne()
		syslib.writestdout("this is actionOne");
	end	
	function actionTwo()
		syslib.writestdout("this is actionTwo");
	end
end

======= Create a rui handler ==============

package client;

handler Hello type RUIhandler {initialUI = [  ],onConstructionFunction = start, cssFile="css/MiniHandler.css", title="Hello"}
	function start()
			trHandler crudeHandler = new crudeHandler;
			syslib.writestdout(" I'm here ");
			trHandler.actionOne();
	end	
end

Deploy the project and open crudeHandler.js in the deployed project you will see these errors

Syntax error on token ",", ~ expected after this token
Syntax error on token ")", delete this token

This is required for the test framework
Comment 1 Scott Greer CLA 2011-09-07 21:34:07 EDT
Kathy,

Joe found -- and fixed -- this today;  please try it again and re-open if necessary...thanks.
Comment 2 Kathy Carroll CLA 2011-09-08 10:11:01 EDT
Verified compile error gone with 0.7.0.v201109080902.
However, when I attemp to run it I get

egl.egl.debug is undefined

here
egl.startupInit = function() {
egl.load(RUI_DEPENDENT_JAVASCRIPT_FILES, 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.rootHandler = new egl.client.Hello();
egl.rootHandler.setParent(egl.Document);
egl.startup();
} catch (e) {
if (e instanceof egl.egl.debug.DebugTermination) {
if (e.msg) egl.println(e.msg);
} else { 

Am I missing a plugin or something?  Habitually doing the worng thing?  Or do I get to write up a separate defect? If it is a defect, is against generation?
Comment 3 Kathy Carroll CLA 2011-09-08 13:32:11 EDT
Verified with 0.7.0.v201109080902.
Created Bug 357128 for issue mentioned in Comment 2
Comment 4 Lisa Lasher CLA 2011-10-11 16:14:01 EDT
Closing this defect.