Skip to main content



      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 09:09 Go to next message
Eclipse UserFriend
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 12:36 Go to previous message
Eclipse UserFriend
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 Jul 27 14:11:00 EDT 2025

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

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

Back to the top