Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Thread Problem...
Thread Problem... [message #437815] Wed, 05 October 2005 13:13 Go to next message
Eclipse UserFriend
Originally posted by: gkurien.icope.com

i have opened a dialog box which have some Text box ...and i do some
operation when i click the OK button .

i use getter methods like "
public String getText1(){
return Text.getText();
}"
to retrieve the contents in the TextBox ...

but i cant use them once i get the control out of the DialogBox coz it
runs in a different thread...

so how do i still retrieve the values from the Text box...

if i store the contents of the Text box into a variable , i know i can
retrive it..but thats not a good practice i think..can u tell me wat my
other possibilities are ?
Re: Thread Problem... [message #437834 is a reply to message #437815] Wed, 05 October 2005 15:45 Go to previous message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

Genu George wrote:
>
> i have opened a dialog box which have some Text box ...and i do some
> operation when i click the OK button .
> i use getter methods like "
> public String getText1(){ return Text.getText();
> }" to retrieve the contents in the TextBox ...
>
> but i cant use them once i get the control out of the DialogBox coz it
> runs in a different thread...
>
> so how do i still retrieve the values from the Text box...
>
> if i store the contents of the Text box into a variable , i know i can
> retrive it..but thats not a good practice i think..can u tell me wat my
> other possibilities are ?
>


1. Have textbox store its values into a variable of the dialog while it
is being updated.

2. Have user of the value create a runnable that runs in the GUI thread
to read out the value of the textbox.

3. When OK is pressed have dialog copy all values from its gui items
into variables of the dialog that can be retrieved by calling methods on
the dialog. typically this is done in a 'close' method of the dialog or
something similar.


I prefer 3.


CL
Previous Topic:Creating an installer for my RCP app
Next Topic:webstart, RCP, and linux
Goto Forum:
  


Current Time: Sat Dec 07 23:32:23 GMT 2024

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

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

Back to the top