01-15-2015 11:40 AM
As Darin mentioned, on other platforms an empty path is valid. Try using the List Folders function with an empty path, what does it return? A list of current drives. If you provide a Not A Path it should error.
In my mind this is the same as supporting the NaN (not a number) for doubles. Why support this when you could just have the default be a 0 and use the Equal 0? to determine if the user didn't enter anything? Because 0 is a valid value for things, just like an empty path can be valid.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-15-2015 01:43 PM
Why don't we have the Not a String value?
01-15-2015 02:08 PM
@Jimmy.chretien wrote:
Why don't we have the Not a String value?
You are trying to be silly, right?
01-15-2015 02:17 PM - edited 01-15-2015 02:17 PM
Empty String/Path? is right there on the comparion palette
01-15-2015 02:39 PM
@Jimmy.chretien wrote:
Why don't we have the Not a String value?
I can't really see a purpose for it, or a use where I could use a string which has a value of "Not a String". I'm guessing that's why one doesn't exist.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-15-2015 02:43 PM
@Hooovahh wrote:
@Jimmy.chretien wrote:
Why don't we have the Not a String value?
I can't really see a purpose for it, or a use where I could use a string which has a value of "Not a String". I'm guessing that's why one doesn't exist.
Usage would be the same as for Not A Path - to distinguish between an unwired terminal, and one that has an empty string wired to it.
01-15-2015 02:58 PM
@GregSands wrote:
Usage would be the same as for Not A Path - to distinguish between an unwired terminal, and one that has an empty string wired to it.
I guess, but I'd just make the terminal required. Now that I think about it I don't really use Not a Path all that often.
On a side note. NI has written functions which can detect if something is wired to them or not, without reading the value. Having this feature be available to normal developers would be nice some times.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-15-2015 09:24 PM
VIA tests for unwired terminals. Check hidden gems. Or look in the shipped tests for the code.
01-15-2015 11:26 PM
@GregSands wrote:
Usage would be the same as for Not A Path - to distinguish between an unwired terminal, and one that has an empty string wired to it.
Well, You simply make a special setinel value the default for the control, e.g. "<Not a String>" and test for that. If you get it, the terminal was not wired.