Bug #1404
Mis à jour par Matthieu Decorde il y a plus de 9 ans
The current File field is set to the OPEN SWT style and Mac users can't select a file to create.
h3. Solution
Define two different widget styles:
* "FileOpen" (synonym "File", for retro-compatibility) field type that set the right SWT style (SWT.OPEN)
* "FileSave" field type that set the right SWT style (SWT.SAVE)
h3. Validation test
create a "ATest" macro with the folowing content and run it :
<pre>
package org.txm.macro
import org.kohsuke.args4j.*
import groovy.transform.Field
import org.txm.rcpapplication.swt.widget.parameters.*
@Field @Option(name="fileopen",usage="an example file", widget="FileOpen", required=true, def="C:/Temp/foo.txt")
def fileopen
@Field @Option(name="filesave",usage="an example file", widget="FileSave", required=true, def="C:/Temp/foo.txt")
def filesave
if (!ParametersDialog.open(this)) return;
</pre>
The 2 File dialogs must be different.
h3. Solution
Define two different widget styles:
* "FileOpen" (synonym "File", for retro-compatibility) field type that set the right SWT style (SWT.OPEN)
* "FileSave" field type that set the right SWT style (SWT.SAVE)
h3. Validation test
create a "ATest" macro with the folowing content and run it :
<pre>
package org.txm.macro
import org.kohsuke.args4j.*
import groovy.transform.Field
import org.txm.rcpapplication.swt.widget.parameters.*
@Field @Option(name="fileopen",usage="an example file", widget="FileOpen", required=true, def="C:/Temp/foo.txt")
def fileopen
@Field @Option(name="filesave",usage="an example file", widget="FileSave", required=true, def="C:/Temp/foo.txt")
def filesave
if (!ParametersDialog.open(this)) return;
</pre>
The 2 File dialogs must be different.