Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » FileFieldEditor Help
FileFieldEditor Help [message #665128] Wed, 13 April 2011 11:45 Go to next message
frank b is currently offline frank bFriend
Messages: 45
Registered: July 2009
Member
Hello,

I'm using a FileFieldEditor form jface plugin in a preference page to
allow user to select an executable file within her or his file system.

A problem comes when I select an "app" executable file in Mac OSX.
As it is actually a Folder, it is not considered to be a valid file
in "checkState" method of FileFieldEditor : the test "if
(file.isFile())" on line 137 obviously returns false and goes through
an error "value must be an existing file". As a result, "Apply" and "OK"
buttons are not enabled.

Am I misusing FileFieldEditor ? Is there another more suitable class ?
Is there a workaround for app mac "files" ?

Thks a lot,
frank

PS : org.eclipse.jface_3.5.2.M20100120-0800.jar
Re: FileFieldEditor Help [message #665561 is a reply to message #665128] Fri, 15 April 2011 06:08 Go to previous messageGo to next message
Lakshmi ShanmugamFriend
Messages: 276
Registered: July 2009
Location: India
Senior Member
Hi,

The SWT FileDialog shows and treats the .app correctly, but as you mentioned the check in the checkState() is causing this.
You should try asking this in the JFace forum if FileFieldEditor should work with .app.
If you want to provide the user with a list of programs to select from, you can use Program.getPrograms(). The Editor Selection dialog uses this mechanism.(Preferences > Editors > File Associations, click on 'Add' next to the 'Associated Editors:' )


Lakshmi P Shanmugam
Re: FileFieldEditor Help [message #665671 is a reply to message #665561] Fri, 15 April 2011 12:08 Go to previous message
frank b is currently offline frank bFriend
Messages: 45
Registered: July 2009
Member
Le 15/04/11 08:09, Lakshmi Shanmugam a écrit :
> Hi,
>
> The SWT FileDialog shows and treats the .app correctly, but as you
> mentioned the check in the checkState() is causing this.
> You should try asking this in the JFace forum if FileFieldEditor should
> work with .app.
> If you want to provide the user with a list of programs to select from,
> you can use Program.getPrograms(). The Editor Selection dialog uses this
> mechanism.(Preferences > Editors > File Associations, click on 'Add'
> next to the 'Associated Editors:' )
Ok, thanks for your reply and idea. And sorry : I will post the
question in JFace forum
Previous Topic:Generate a nice print output
Next Topic:html5 placeholder like for SWT
Goto Forum:
  


Current Time: Thu Feb 27 18:49:09 GMT 2020

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

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

Back to the top