Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » problem clicks and doubleclicks on table cells
problem clicks and doubleclicks on table cells [message #35569] Mon, 18 May 2009 11:32 Go to next message
Pavel Cybulskij is currently offline Pavel Cybulskij
Messages: 21
Registered: July 2009
Junior Member
Hallo all together (sorry for my bad english),

i have the following problem.
my perspective, that i test with swtbot, has 4 views.
Each view has ist own table. The content of three tables depends on
clicked rows in the first table.
If i try to simulate the click on a cell of table(0) with e.q.
this.bot.table(0).click(1,1); [or this.bot.table(0).doubleClick(1,1);]
the cell is only selected with gray color, but it comes to no "action"
(other tables doesn't become new data), as it works by real click.

How can i solve it?
Thanks a lot for your answers.

Pavel.
Re: problem clicks and doubleclicks on table cells [message #35603 is a reply to message #35569] Tue, 19 May 2009 04:45 Go to previous messageGo to next message
Marc is currently offline Marc
Messages: 32
Registered: July 2009
Member
Hi,

I can see your problem, I can't help about single click because I've not
searched for it.
But about double click I can.
The double click did not work either for me, I had to use this patch:

private static void patchTableDblClick(final SWTBotTable swtBotTable) {
UIThreadRunnable.asyncExec(new VoidResult() {
public void run() {
swtBotTable.widget.notifyListeners(SWT.DefaultSelection,
new Event());

}
});
}

add this code to yours.
Be sure to first select a row in your table (even if it shows grey) then
call this function.

I think there migth be a similar solution for the single click issue.
But I didn't try.

Marc
Re: problem clicks and doubleclicks on table cells [message #35703 is a reply to message #35603] Tue, 19 May 2009 06:54 Go to previous messageGo to next message
Pavel Cybulskij is currently offline Pavel Cybulskij
Messages: 21
Registered: July 2009
Junior Member
Hi Marc,

thanks for your answer.
Unfortunately it didn't function in my case.

But i have already found a solution:
I set focus on the view with table(0) after "click" with
bot.view("myMainView").setFocus();
and other dependend views will actualised.

Bye,
Pavel
Re: problem clicks and doubleclicks on table cells [message #35771 is a reply to message #35703] Tue, 19 May 2009 08:07 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
Thanks for that investigation. I've fixed this and should be available
in the next release.

-- Ketan

On 19/5/09 16:24, Pavel Cybulskij wrote:
> Hi Marc,
>
> thanks for your answer. Unfortunately it didn't function in my case.
>
> But i have already found a solution: I set focus on the view with
> table(0) after "click" with
> bot.view("myMainView").setFocus();
> and other dependend views will actualised.
>
> Bye,
> Pavel
>
>
Re: problem clicks and doubleclicks on table cells [message #35805 is a reply to message #35603] Tue, 19 May 2009 08:09 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
This is related to

https://bugs.eclipse.org/bugs/show_bug.cgi?id=259908 and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=271132

-- Ketan

On 19/5/09 14:15, Marc wrote:
> Hi,
>
> I can see your problem, I can't help about single click because I've not
> searched for it.
> But about double click I can.
> The double click did not work either for me, I had to use this patch:
>
> private static void patchTableDblClick(final SWTBotTable swtBotTable) {
> UIThreadRunnable.asyncExec(new VoidResult() {
> public void run() {
> swtBotTable.widget.notifyListeners(SWT.DefaultSelection,
> new Event());
>
> }
> });
> }
>
> add this code to yours.
> Be sure to first select a row in your table (even if it shows grey) then
> call this function.
>
> I think there migth be a similar solution for the single click issue.
> But I didn't try.
>
> Marc
>
Previous Topic:Problem with "SWTBot Test"
Next Topic:Status update on some new features.
Goto Forum:
  


Current Time: Thu Aug 21 00:23:04 EDT 2014

Powered by FUDForum. Page generated in 0.01889 seconds