LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BUG? Specifying multiple file types (by extension) for File Dialog fails in Mac OS X

Solved!
Go to solution

[cross posted to LAVA]

 

The file dialog allows specifying multiple types (that can be selected by the user) by passing the dialog primitive a semicolon delimited list of patterns. For example, you can allow the user to choose TXT or INI file types by passing a pattern of "*.txt;*.ini" to the file dialog primitive, as shown below:

Attached Image

However, when this is run on Mac OS X, neither of the specified file types is selectable by the user, as shown below:

 Reduced 14%
Attached Image
635 x 403 (55.57K)
 

I have tested this on LabVIEW 8.2 and 8.6 for Mac -- both have the same problem.

The help documentation for the File Dialog primitive states that this should work on all platforms -- there is no exception for Mac:

QUOTE
pattern (all files)
Restricts the files displayed in the dialog box to those whose name matches pattern (all files). pattern (all files) does not restrict the directories displayed. The pattern matching in this function is similar to the matching used in matching wildcards in Windows and Linux file names. If you specify characters other than the question mark character (?) or the asterisk character (*), the function displays only files or directories that contain those characters. You can use the question mark character (?) to match any single character. You can use the asterisk character (*) to match any sequence of one or more characters.

For example, a pattern (all files) of *.vi;test*.llb returns matches for any file with a .vi extension and any file whose file name begins with test and has a .llb extension.

To match multiple patterns, use a semicolon ( ; ) to separate the patterns. White space, such as blanks, tabs, and carriage returns, are taken literally. Avoid using white spaces unless they are part of the extension pattern. For example, if you use *.html;*.doc, the dialog box displays all files that end with .html and .doc. If you use *.html; *.doc, the dialog box displays only files that end with .html.


Does anyone know a work-around or if I'm doing something wrong?

0 Kudos
Message 1 of 8
(4,721 Views)

Jim,

 

I ran into something like this recently.  At the moment I do not recall what I was working on or how I resolved it.  I will keep it in mind and post again if I can find it.  I do not think I found a satisfactory solution, but got something else to work for that application.

 

Lynn 

Message 2 of 8
(4,671 Views)
Solution
Accepted by topic author Jim_Kring

Thank you for bringing this up. I found the problem. This should be fixed in the next major release of LabVIEW. If you have any problems with the file dialogs on the Mac, please mention my name when reporting it, and I'll make sure it's taken care of.

 

Thanks.

 

Message Edited by MarcPage on 12-01-2008 09:29 PM
0 Kudos
Message 3 of 8
(4,640 Views)

Hi Marc,

 

Thanks for the info.  I'm glad you were able to confirm that it was a bug and that it will be fixed, soon.  BTW, do you have a CAR number that you could provide?

 

Now comes the fun part...

 

How do I work around this issue?  I've got applications (e.g., VIPM) where I really need this functionality.  Do you know of a straight-forward way to call the Mac OS X API's (e.g. Carbon Framework or similar) to create a working dialog?


Thanks,

 

-Jim

Message Edited by Jim Kring on 12-01-2008 07:48 PM
0 Kudos
Message 4 of 8
(4,635 Views)
This was reported to R&D (CAR # 818352) for further investigation. Actually I just fixed it, just had to use the standard text to report the CAR #.
0 Kudos
Message 5 of 8
(4,596 Views)

Hi Marc,

 

Thanks for the CAR #.  This will help us track when the fix actually arrives.

 

 Cheers,

 

-Jim

0 Kudos
Message 6 of 8
(4,583 Views)
Correction: This was reported to R&D (CAR # 111447) for further investigation. Too many numbers to keep track of. Sorry about that.
0 Kudos
Message 7 of 8
(4,548 Views)

 


MarcPage wrote:
Correction: This was reported to R&D (CAR # 111447) for further investigation. Too many numbers to keep track of. Sorry about that.

 

Thanks for the update.

0 Kudos
Message 8 of 8
(4,536 Views)