Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Can't add text in a grid's cell
icon5.gif  Can't add text in a grid's cell [message #1693063] Tue, 21 April 2015 13:46 Go to next message
Chris Champion is currently offline Chris ChampionFriend
Messages: 49
Registered: February 2014
Member
Hello,

I'm trying to edit (enter text) into the cell of a nebula grid (org.eclipse.nebula.widgets.grid.Grid).

Attaching screenshot of what the result should look like: edit-cell.png.

RCPTT records the example test as follows. When I run it the test passes but nothing is actually written into the grid's cell -- it remains blank.

with [get-view "Company Search" | get-nebula-grid] {
    select "" | activate-cell-edit
    type-text abbccddeffgg
    apply-cell-edit -deactivate
}


In assertion mode I can check if a cell contains text, for example:
get-view "Company Search" | get-nebula-grid | get-item "" | get-property "columns[1]" | equals abcdefg | verify-true


Shouldn't it then also be possible to write text in the cell?

Thank you,
Chris
Re: Can't add text in a grid's cell [message #1693196 is a reply to message #1693063] Wed, 22 April 2015 11:01 Go to previous messageGo to next message
Olga Yurchuk is currently offline Olga YurchukFriend
Messages: 245
Registered: September 2014
Senior Member

Hi,

I've found a bug with nebula grid. It seems that it's related to your case.
Try to add -column 1 after activate-cell-edit:
with [get-view "Company Search" | get-nebula-grid] {
    select "" | activate-cell-edit -column 1
    type-text abbccddeffgg
    apply-cell-edit -deactivate
}


Please let me know if it helps.


Yours sincerely,
Olga.
Re: Can't add text in a grid's cell [message #1693356 is a reply to message #1693196] Thu, 23 April 2015 12:50 Go to previous messageGo to next message
Chris Champion is currently offline Chris ChampionFriend
Messages: 49
Registered: February 2014
Member
Hi Olga,
Unfortunately adding the -column 1 parameter didn't work.
The test still passes but nothing is written into the cell.

I tried adding get-item-cell and a wait period and see that the cell is being selected (screenshot attached) but after the wait it's immediately deselected again without writing anything into it.

with [get-view "Company Search" | get-nebula-grid] {
	get-item "" | get-item-cell -column Company | click
	wait -ms 3000
	select "" | activate-cell-edit -column 1
	type-text abc
	apply-cell-edit -deactivate
}


Is there anything else I could try?

Thank you,
Chris
Re: Can't add text in a grid's cell [message #1693361 is a reply to message #1693356] Thu, 23 April 2015 13:45 Go to previous messageGo to next message
Olga Yurchuk is currently offline Olga YurchukFriend
Messages: 245
Registered: September 2014
Senior Member

Hello,
Could you please try to select another cell in the end?
1. select needed cell
2. type text
3. select another cell
4. deactivate editing
Please let me know if it helps.


Yours sincerely,
Olga.
Re: Can't add text in a grid's cell [message #1693362 is a reply to message #1693361] Thu, 23 April 2015 13:48 Go to previous messageGo to next message
Olga Yurchuk is currently offline Olga YurchukFriend
Messages: 245
Registered: September 2014
Senior Member

Also, just for diagnostics, add wait after type-text abc to ensure that text was typed into needed cell.

Yours sincerely,
Olga.
Re: Can't add text in a grid's cell [message #1693363 is a reply to message #1693362] Thu, 23 April 2015 13:55 Go to previous messageGo to next message
Chris Champion is currently offline Chris ChampionFriend
Messages: 49
Registered: February 2014
Member
Just tried this with no difference:
with [get-view "Company Search" | get-nebula-grid] {
	get-item "" | get-item-cell -column Company | click
	select "" | activate-cell-edit -column 1
	type-text abc
	wait -ms 3000
	select "" | activate-cell-edit -column 2
	apply-cell-edit -deactivate
}
Re: Can't add text in a grid's cell [message #1834274 is a reply to message #1693363] Fri, 06 November 2020 10:44 Go to previous message
Kieran McCarthy is currently offline Kieran McCarthyFriend
Messages: 2
Registered: November 2020
Junior Member
I had a similar issue and after much frustration this worked for me:

select "" | get-cell -row 2 -column 0 | double-click
with [get-editbox] {
set-text abc
key-type Enter
}
apply-cell-edit -deactivate
Previous Topic:Problem with creating custom ecl command
Next Topic:exec-process function returns "error=2, No such file or directory"
Goto Forum:
  


Current Time: Wed Feb 21 18:16:12 GMT 2024

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

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

Back to the top