Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGL Development Tools » Gridlayout in datagrid(Array index mixup)
Gridlayout in datagrid [message #870468] Tue, 08 May 2012 11:19 Go to next message
Trond Einar Nilsen is currently offline Trond Einar NilsenFriend
Messages: 33
Registered: December 2011
Member
Hi,
In a datagrid I placed a customized widget with a GridLayout and show it using editorBehaviors. In row 3 in the Grid Layout I placed an input field like this:

function mySNHPCPPFunction(grid DataGrid in, cell Widget in, rowData any in, rowIndex int in, column DataGridColumn in, value any in) returns(Widget)
case(column.name)
when("ALTERNATIVES")
CommonData.snhpcppREC.HPHUCD = rowdata.hphucd;
CommonData.snhpcppREC.HPK9NR = rowdata.hpk9nr;
Interest Interest{}; //widget containing a gridlayout with input field
return(interest);
end

When clicking inside the inputfield I get this ERROR:
[CRRUI1083E] An error occurred while the click browser event was being handled.
[CRRUI2022E] Index 3 is out of bounds for this array. Array size is 2
[CRRUI2094E] Here are the EGL function calls leading to this error:
org/eclipse/edt/rui/widgets/DataGrid.egl() at line 1148
org/eclipse/edt/rui/widgets/DataGrid.egl() at line 978
As far as I can see the problem is that the datagrid consist of two rows, but the row number from the gridlayout (row 3) is used and creates the array out of bounds.
A workaround for me is to make sure the datagrid consist of more than two rows or move the input field to gridlayout row 1. With either of those alternatives it works as it should. Is this a bug or have a messed something up?
Regards
Trond

[Updated on: Tue, 08 May 2012 11:19]

Report message to a moderator

Re: Gridlayout in datagrid [message #871029 is a reply to message #870468] Thu, 10 May 2012 14:51 Go to previous messageGo to next message
Justin Spadea is currently offline Justin SpadeaFriend
Messages: 66
Registered: July 2009
Member
Hi Trond,

I think I'd better understand your situation if you could attach the full source for the part. If that's not possible, a small example handler with the problem would be helpful.

-Justin
Re: Gridlayout in datagrid [message #871153 is a reply to message #871029] Fri, 11 May 2012 07:28 Go to previous messageGo to next message
Trond Einar Nilsen is currently offline Trond Einar NilsenFriend
Messages: 33
Registered: December 2011
Member
Hi Justin,
I made a simple handler to show the error. Click in textfield and error shows.
By changing line 45 from:

Glayout1 gridlayout{cellPadding = 4, rows = 4, columns = 1, children =[textfield1{layoutData = new GridLayoutData{row = 4, column = 1}, height = 20}

to:

Glayout1 gridlayout{cellPadding = 4, rows = 4, columns = 1, children =[textfield1{layoutData = new GridLayoutData{row = 3, column = 1}, height = 20}

the error do not occur

If textfield is placed in gridlayout row greater than number of rows in datagrid the error appears. This is not a big problm for me now as I have found a workaround.

Rgds, Trond
  • Attachment: gridtest.egl
    (Size: 1.82KB, Downloaded 101 times)

[Updated on: Fri, 11 May 2012 07:29]

Report message to a moderator

Re: Gridlayout in datagrid [message #871693 is a reply to message #871153] Mon, 14 May 2012 17:31 Go to previous messageGo to next message
Justin Spadea is currently offline Justin SpadeaFriend
Messages: 66
Registered: July 2009
Member
Thanks for attaching the sample, I was able to see what you described. I don't know enough about this widget to confirm if it's a defect, so I've asked someone else to take a look.

-Justin
Re: Gridlayout in datagrid [message #878516 is a reply to message #871693] Tue, 29 May 2012 13:22 Go to previous messageGo to next message
Trond Einar Nilsen is currently offline Trond Einar NilsenFriend
Messages: 33
Registered: December 2011
Member
Hi again,
Just some additional info. When I make a nested datagrid inside a datagrid I get the same index error when the nested grid has more records than the "mother" datagrid. This occurs when the nested datagrid is loaded with data.
When I instead make the nested grid as a dojogrid inside a datagrid it works fine.
/Trond
Re: Gridlayout in datagrid [message #879750 is a reply to message #878516] Thu, 31 May 2012 19:25 Go to previous messageGo to next message
Justin Spadea is currently offline Justin SpadeaFriend
Messages: 66
Registered: July 2009
Member
Hi Trond,

Sorry it's taking so long to get someone to look at this, I've sent out another email asking for confirmation if it's a bug. I'd say if you don't hear back in the next couple days, just go ahead and open a bug - that should get it some extra attention Smile.

-Justin
Re: Gridlayout in datagrid [message #881307 is a reply to message #878516] Mon, 04 June 2012 10:12 Go to previous message
lu lu is currently offline lu luFriend
Messages: 9
Registered: June 2012
Junior Member
Sorry for the late response, I am taking a look at this issue, need some time, I will reply ASAP. Thanks.
Previous Topic:Error when connecting to IBM i
Next Topic:Displaying PDFs from IBM i
Goto Forum:
  


Current Time: Sat Dec 20 05:29:55 GMT 2014

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

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