Bug #1404
RCP: Macro File field open or save option
Status: | New | Start date: | 06/18/2015 | ||
---|---|---|---|---|---|
Priority: | Normal | Due date: | |||
Assignee: | - | % Done: | 80% |
||
Category: | Macros | Spent time: | - | ||
Target version: | TXM 0.7.8 |
Description
The current File field is set to the OPEN SWT style and Mac users can't select a file to create.
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)
Validation test¶
create a "ATest" macro with the folowing content and run it :
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;
The 2 File dialogs must be different.
History
#1 Updated by Matthieu Decorde almost 8 years ago
- Description updated (diff)
#2 Updated by Matthieu Decorde almost 8 years ago
- Target version changed from TXM 0.7.7 to TXM 0.7.8
#3 Updated by Matthieu Decorde over 7 years ago
- Target version changed from TXM 0.7.8 to TXM 0.8.0a (split/restructuration)
#4 Updated by Serge Heiden about 7 years ago
- Description updated (diff)
#5 Updated by Serge Heiden about 7 years ago
- Target version changed from TXM 0.8.0a (split/restructuration) to TXM 0.7.8
- % Done changed from 80 to 50
#6 Updated by Matthieu Decorde about 7 years ago
- % Done changed from 50 to 20
#7 Updated by Matthieu Decorde about 7 years ago
- % Done changed from 20 to 80
#8 Updated by Matthieu Decorde almost 7 years ago
- Description updated (diff)