Bug #847

RCP: x.x, macro Parameters dialog box fields of type 'File' fail with empty value

Added by Matthieu Decorde about 5 years ago. Updated almost 4 years ago.

Status:Closed Start date:06/05/2014
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:Macros Spent time: -
Target version:TXM 0.7.6

Description

If the field is empty an exception is raised. This bevavior hinder us if we want non-mandatory File fields

History

#1 Updated by Serge Heiden about 5 years ago

  • Subject changed from RCP: x.x,Parameters dialog File field failed with empty value to RCP: x.x, macro Parameters dialog box fields of type 'File' fail with empty value

#2 Updated by Matthieu Decorde about 5 years ago

  • % Done changed from 0 to 80

#3 Updated by Matthieu Decorde about 5 years ago

  • Tracker changed from Task to Bug

#4 Updated by Matthieu Decorde about 5 years ago

  • % Done changed from 80 to 90

Tested with macro

// STANDARD DECLARATIONS

import org.kohsuke.args4j.*
import groovy.transform.Field
import org.txm.rcpapplication.swt.widget.parameters.*

// BEGINNING OF PARAMETERS

@Field @Option(name="file",usage="an example file", widget="File", required=false, def="C:/Temp/foo.txt")
def file

@Field @Option(name="folder",usage="an example folder", widget="Folder", required=false, def="C:/Temp")
def folder

// Open the parameters input dialog box
if (!ParametersDialog.open(this)) return;

// END OF PARAMETERS

println "file $file" 
println "folder $folder" 

#5 Updated by Matthieu Decorde almost 5 years ago

  • % Done changed from 90 to 100

#6 Updated by Matthieu Decorde almost 5 years ago

  • Status changed from New to Closed

#7 Updated by Matthieu Decorde almost 4 years ago

  • Category set to Macros

Also available in: Atom PDF