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

Bug 355094

Summary: JS: StrLib.characterLen triggers exception for missing function
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javascriptgen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: greer
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-08-18 10:53:05 EDT
I can't open my handler with the webbrowser due to message eglx/rbd/StrLib.js line 36 text.trim().length() is not a function.

Here's my rui handler

handler Tester type RUIhandler {onConstructionFunction = start, cssFile="css/Alpha.css", title="MyHandler"}
		
	function start()
		SysLib.WriteStdOut("Hello from Tester JavaScript Batch");
		testCharacterLen();
    	SysLib.WriteStdout("Done with test");
	end	


	function testCharacterLen()
		data string = "This is some random data";
		size1, size2 int = -33;
    	size1 = strLib.characterLen(data);
		Syslib.writeStdout(" size 1 " + size1);
		data += "           ";
		size2 = strlib.characterLen(data);
		Syslib.writeStdout(" size 2 " + size2);
		if (size1 == size2)
			syslib.writestdout(" size1 == size2");
		else
			syslib.writestdout(" size1 != size2 -- blanks are counted");
		end
	end
end
Comment 1 Scott Greer CLA 2011-09-10 15:33:24 EDT
Fixed.
Comment 2 Kathy Carroll CLA 2011-09-12 11:05:09 EDT
Verified this problem doesn't happen.  However, can't run the code due to Bug 357143.  Used 201109120910
Comment 3 Lisa Lasher CLA 2011-10-11 16:27:27 EDT
Closing this defect.