Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » How to cancel the edition of an editbox
How to cancel the edition of an editbox [message #1729277] Tue, 12 April 2016 14:04 Go to next message
Elise Ruelle is currently offline Elise RuelleFriend
Messages: 74
Registered: April 2013
Member
Hi everyone,

I'm facing an issue with in a RCPTT script.

In my application, I have an Editbox which appear when I type F2 key. If I wrote something in this editbox, I have two possibilities :
- With the Enter key or if I click anywhere, I validate the modifications
- With the Esc key, I cancel the modifications and the value come back to the previous one. Here is my problem.

When I try to record the second action, RCPTT record the following script :
key-type F2
with [get-editbox] {
        set-text toto
        key-type "TRAVERSE_ESCAPE"
}


When I replay this section, the script :
- set the text in the editbox,
- close the editbox
- type the Esc key

So, how can my script type Esc before the editbox closing ?

Do you have any workaround or any clue to help me ?


Thank you per advance for your help!


Elise Ruelle

ALL4TEC
Re: How to cancel the edition of an editbox [message #1730105 is a reply to message #1729277] Thu, 21 April 2016 11:49 Go to previous messageGo to next message
Elise Ruelle is currently offline Elise RuelleFriend
Messages: 74
Registered: April 2013
Member
Does anyone have a clue to this kind of issue ?

Thanks for your help


Elise Ruelle

ALL4TEC
Re: How to cancel the edition of an editbox [message #1731007 is a reply to message #1730105] Mon, 02 May 2016 06:32 Go to previous messageGo to next message
Andrey Sobolev is currently offline Andrey SobolevFriend
Messages: 75
Registered: February 2015
Member
Hi,

set-text is do focus-out after setting a test, so if you have a listener inside it this is causing hiding.

Please try replace set-text with type-text.
It will just send symbols to edit box without focus lost event.

Best regards,
Andrey.
Re: How to cancel the edition of an editbox [message #1731162 is a reply to message #1731007] Tue, 03 May 2016 09:27 Go to previous message
Elise Ruelle is currently offline Elise RuelleFriend
Messages: 74
Registered: April 2013
Member
Hi Andrey,

Thank you for your reply.

I've tried your solution and it works pretty well in my case !

I add just the solution corresponding at my first message, if it could help anyone :

key-type F2
    with [get-editbox] {
        type-text titi
        set-focus
        key-type "ESCAPE"
    }


Thanks a lot for your answer ! I was really helpful !


Elise Ruelle

ALL4TEC
Previous Topic:Error Launching Teamcenter
Next Topic:TOD in logs and/or reports
Goto Forum:
  


Current Time: Thu Apr 25 17:44:04 GMT 2024

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

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

Back to the top