It seems that the change for multiple files in the file dialogs has broken
ClientContext.chooseFile when the user selects a non-existent file (such as
when saving a new file).
This code demonstrates what I mean:
ULCComponent owner = null;
FileChooserConfig fcConfig = new FileChooserConfig();
fcConfig.setDialogTitle("Save Project");
fcConfig.setApproveButtonText("Save");
ClientContext.chooseFile(new IFileChooseHandler() {
public void onSuccess(String[] filePaths, String[] fileNames) {
System.out.println("SUCCESS");
}
public void onFailure(int reason, String description) {
String sMessage;
if (reason == IFileChooseHandler.CANCELLED)
sMessage = "Open Canceled";
else
sMessage = "Open Failed: " + description;
System.out.println(sMessage);
}
}, fcConfig, owner);
When an existing file is selected and the "Save" button clicked, the
onSuccess method is called; if a new filename is entered and the "Save"
button clicked, the onFailure method is called with a Cancelled value.
I would apperciate any workrounds you can give.
Thanks.
-Stuart Booth (Abacus Research)
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer