Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » File Dialog opens default path all the time(File Dialog opens default path all the time)
File Dialog opens default path all the time [message #870251] Mon, 07 May 2012 13:09 Go to next message
Abbas Mohd is currently offline Abbas MohdFriend
Messages: 31
Registered: February 2012
Member
Hi,
I am using eclipse 3.7 in solaris environment.

I am trying to open one directory using SWT FileDialog.

// here is my code snippet to open directory
FileDialog fd = new FileDialog(new Shell(), SWT.OPEN);
fd.setText("Open");
fd.setFilterPath(File.separator+"net"+File.separator+"vajra"+File.separator+"axeiv");
String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
System.out.println(fd.getFilterPath());
String selected = fd.open();

But what ever may be the path it opening default path.
FileDialog.open is calling openChooserDialog () method in eclipse 3.7.

Can some one tell me why my FileDialog is not opening the filterPath.

Regards,
Abbas.
Re: File Dialog opens default path all the time [message #873608 is a reply to message #870251] Fri, 18 May 2012 16:36 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi, sorry for the late reply,

I thought this used to work on Solaris, but I see the same as you. I've
logged https://bugs.eclipse.org/bugs/show_bug.cgi?id=380000 .

Grant


On 5/7/2012 9:09 AM, Abbas Mohd wrote:
> Hi,
> I am using eclipse 3.7 in solaris environment.
>
> I am trying to open one directory using SWT FileDialog.
>
> // here is my code snippet to open directory
> FileDialog fd = new FileDialog(new Shell(), SWT.OPEN);
> fd.setText("Open");
> fd.setFilterPath(File.separator+"net"+File.separator+"vajra"+File.separator+"axeiv");
>
> String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
> System.out.println(fd.getFilterPath());
> String selected = fd.open();
>
> But what ever may be the path it opening default path.
> FileDialog.open is calling openChooserDialog () method in eclipse 3.7.
>
> Can some one tell me why my FileDialog is not opening the filterPath.
>
> Regards,
> Abbas.
Previous Topic:Combo and database.
Next Topic:How can I use SashForm with any layout other than FillLayout
Goto Forum:
  


Current Time: Sun Sep 27 16:44:59 GMT 2020

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

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

Back to the top