Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGL Development Tools » Possible problem with basic handlers
Possible problem with basic handlers [message #759081] Sat, 26 November 2011 05:41 Go to next message
Dan Darnell is currently offline Dan DarnellFriend
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member

I encountered an issue with a large-ish application that I think I have boiled down into a simple example...

First, a working example. A simple basic handler and a RUI handler:

package com.dandarnell.life.client;

handler TestBasic

	private state int;
	
	function setState(state int in)
		this.state = state;
	end

	function getState() returns(int)
		return(state);
	end

end

package com.dandarnell.life.client;

import org.eclipse.edt.rui.widgets.*;

handler TestRUI type RUIhandler{initialUI =[ui], onConstructionFunction = start, cssFile = "css/Test2.css"}

    ui GridLayout{columns = 3, rows = 4, cellPadding = 4, children =[l]};
	l TextLabel { text = "state=nil", layoutData = new GridLayoutData {row=1, column=1} };

	testBasic TestBasic[] = new TestBasic[2];
	
    function start()
    	x int = testBasic[1].getState();   // <--- this works
    	l.text = x;
    end
end





Now, the non-working example. No change to the basic handler. The difference in the RUI handler is a multi-dimensional array.

package com.dandarnell.life.client;

import org.eclipse.edt.rui.widgets.*;

handler TestRUI type RUIhandler{initialUI =[ui], onConstructionFunction = start, cssFile = "css/Test2.css"}

    ui GridLayout{columns = 3, rows = 4, cellPadding = 4, children =[l]};
	l TextLabel { text = "state=nil", layoutData = new GridLayoutData {row=1, column=1} };

	testBasic TestBasic[][] = new TestBasic[2][2];   //<------------------
	
    function start()
    	x int = testBasic[1][1].getState();              //<--doesn't work
    	l.text = x;
    end
end



Here's the runtime error:

Could not render UI
Object doesn't support this property or method
[CRRUI2094E] Here are the EGL function calls leading to this error:

com/dandarnell/life/client/TestRUI.egl() at line 13
TestRUI.<init>() [native JavaScript]

Line 13 is...

x int = testBasic[1][1].getState();


Interestingly, I have seen cases where this code is flagged as in-error in the editor. Clicking on the "X" shows an internal runtime exception. In other cases, no error in indicated in the editor but the runtime error occurs.

Also, it matters NOT that the code is in the onConstruction function. Anywhere I use similar code I get the error.

Am I doing something wrong or is this a bug?

--Dan




Re: Possible problem with basic handlers [message #759474 is a reply to message #759081] Mon, 28 November 2011 19:06 Go to previous messageGo to next message
Dan Darnell is currently offline Dan DarnellFriend
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member

I moved away from using basic handlers and defined my data in a record and used a library for functions to operate on that data.

I encountered errors with this implementation as well. Again, only with a multi-dimensional array. Bug?

--Dan

Re: Possible problem with basic handlers [message #759782 is a reply to message #759474] Wed, 30 November 2011 02:22 Go to previous messageGo to next message
Brian Svihovec is currently offline Brian SvihovecFriend
Messages: 55
Registered: July 2009
Member
Dan,

This sounds like a bug, go ahead and open a new defect against the JavaScript component - https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EDT.

-Brian
Re: Possible problem with basic handlers [message #760297 is a reply to message #759782] Thu, 01 December 2011 19:43 Go to previous message
Dan Darnell is currently offline Dan DarnellFriend
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member

Created bug report:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=365356

--Dan
Previous Topic:EDT SQLDataSource init error - REST webservices - running on tomcat
Next Topic:jt400.jar not working in deployed application
Goto Forum:
  


Current Time: Wed Dec 17 23:21:43 GMT 2014

Powered by FUDForum. Page generated in 0.01636 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software