LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"File Path Control" default Value

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.

0 Kudos
Message 11 of 19
(1,509 Views)

Why don't we have the Not a String value?

0 Kudos
Message 12 of 19
(1,502 Views)

@Jimmy.chretien wrote:

Why don't we have the Not a String value?


You are trying to be silly, right?

Message 13 of 19
(1,492 Views)

Empty String/Path? is right there on the comparion palette

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 14 of 19
(1,487 Views)

@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.

0 Kudos
Message 15 of 19
(1,476 Views)

@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.

0 Kudos
Message 16 of 19
(1,470 Views)

@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.

Message 17 of 19
(1,465 Views)

VIA tests for unwired terminals.  Check hidden gems.  Or look in the shipped tests for the code.


"Should be" isn't "Is" -Jay
0 Kudos
Message 18 of 19
(1,447 Views)

@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.

0 Kudos
Message 19 of 19
(1,433 Views)