Skip to main content



      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 09:46 Go to next message
Eclipse UserFriend
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 07:01 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Can't add text in a grid's cell [message #1693356 is a reply to message #1693196] Thu, 23 April 2015 08:50 Go to previous messageGo to next message
Eclipse UserFriend
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 09:45 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Can't add text in a grid's cell [message #1693362 is a reply to message #1693361] Thu, 23 April 2015 09:48 Go to previous messageGo to next message
Eclipse UserFriend
Also, just for diagnostics, add wait after type-text abc to ensure that text was typed into needed cell.
Re: Can't add text in a grid's cell [message #1693363 is a reply to message #1693362] Thu, 23 April 2015 09:55 Go to previous messageGo to next message
Eclipse UserFriend
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 05:44 Go to previous message
Eclipse UserFriend
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 Jul 09 04:08:09 EDT 2025

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

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

Back to the top