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

FileDialog.open() returns the full path of the file.

So in your listener you would basically have:

	String chosenFile = fd.open();

Is that not what you had in mind?

Regards,
Nik


Gaff wrote:
Hey,

I wan to retrieve a file location within an app, and save the locatoin as a string.

 From a SWT Shell I have a button that calls FileDialog(s, SWT.OPEN)

The button has a SelectionListener so when it's pushed the the filedialog opens.

The only thing is I want to use the fd.open() part in the original SWT shell but it's wrapped in the listener so I can't access it? Get it out of the wrapper?

Thanks for your help,

Gaff