Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370886 - Error: 'object' is null or not an object
Summary: Error: 'object' is null or not an object
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5 M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-07 15:57 EST by Chris Fairhall CLA
Modified: 2012-02-08 02:57 EST (History)
2 users (show)

See Also:


Attachments
Error displayed in browser (59.35 KB, text/plain)
2012-02-07 15:57 EST, Chris Fairhall CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Fairhall CLA 2012-02-07 15:57:10 EST
Build Identifier: 1.5.0-N-20120202-0214

Occurs when my RAP application is started. Does not occur on Controls Demo. Effects only IE8, Firefox is fine. I don't have access to IE9 to test.

Reproducible: Always
Comment 1 Chris Fairhall CLA 2012-02-07 15:57:53 EST
Created attachment 210694 [details]
Error displayed in browser
Comment 2 Chris Fairhall CLA 2012-02-07 16:31:47 EST
It looks like the cause to the issue is related to org.eclipse.ui.forms.widgets.Hyperlink and org.eclipse.ui.forms.widgets.ImageHyperlink

When all code that creates the hyperlinks is commented out I get the following warning (but everything else works):

Message: Expected identifier, string or number
Line: 5
Char: 2097
Code: 0
URI: http://127.0.0.1:8088/rwt-resources/resources-8113dd26.js



The Line/Char refers to the javascript class for org.eclipse.ui.forms.widgets.FormText
The code in that class is:

createImageSegment:function(b,a){
	var c=new qx.ui.basic.Image();
	c.setAppearance("formtext-image");
	c.set({source:b,left:a[0],top:a[1],width:a[2],height:a[3],});
	this._segments[this._segments.length]=c;
	this.add(c)
}

c.set(...); seems to have a missing element in the array. That was changed 6 days ago - version 1.5 in cvs
Comment 3 Chris Fairhall CLA 2012-02-07 16:37:40 EST
(In reply to comment #2)

I loaded the org.eclipse.rap.ui.forms plugin as source, removed the excess "," from the end of the array and it solves the problem.
Comment 4 Cole Markham CLA 2012-02-07 17:18:08 EST
FYI, the trailing comma only breaks in IE, I've run into that several times. It could be that IE9 doesn't break anymore which may be why it wasn't caught.

It also looks like there is a missing semicolon on the last line.
Comment 5 Austin Riddle CLA 2012-02-07 18:13:29 EST
Changes are in CVS HEAD.  Thanks for the bug report!
Comment 6 Ivan Furnadjiev CLA 2012-02-08 02:57:48 EST
Added JSHint validation to the forms bundle to prevent such errors in the future.