[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: Retrieve String from Open File Dialogue

You can pass an object, say a Map, to your SWT windows through its constructor and then have the SWT Window put whatever it wants back in that Map and then you have it. To populate that Map object inside your window, you can bind some logic to various events that, for example, when a user enters a string in a text control, the event handler populates your Map object, or other approaches.

Another approach is to use the JFace databinding libraries which is very nice; see http://wiki.eclipse.org/index.php/Data_Binding_HOWTO for more info.


Ali.



Gaff wrote:
Thanks for your answers, that helps alright.

I have an application (GMF) that opens a a SWT window that I have. There are two thing I want to do. Firstly pass information from my app to the SWT window so it will be displayed, Having the constructor of the SWT window expect these values and then just read them into the display seems to work fine.

But, how do I get back the information after the user has finishing editing them?
i.e. closed the window?


Thanks for your help,

Gaff