DzFileDialog doesn't return expected value
![Dafa](https://secure.gravatar.com/avatar/aa62aba71b3f895137f3a46faaf2afd8?&r=pg&s=100&d=https%3A%2F%2Fvanillicon.com%2Faa62aba71b3f895137f3a46faaf2afd8_100.png)
Ok, so according to the Daz Documentation, it says that DzFileDialog will return undefined if the user cancels the dialogue. However, when I do it returns an empty string. Am I doing something wrong here? Or is it just my tired eyes taking effect?
var path = FileDialog.doDirectoryDialog(qsTr("Select a directory"),"",sCurrentPath);print(path); // returns empty string ("")
e
Post edited by Dafa on
Comments
The description needs updating - the returns for DzFileDialog are mostly a string (one returns an array) and in the event of cancellation the return value is defined but empty (i.e. "" for a string). Check the length of the return is greater than 0 after checking that it exists.