|
04-17-2017, 06:41 PM
|
#1
|
Human being with feelings
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
|
Question about portability of IFileSelectorControl
I have been eperimenting with IFileSelectorControl on a Windows build (Windows 10) of a plugin I am working on, and am wondering if this control will work once I attempt to try and compile on a Mac with XCode. Will this work as I hope?
|
|
|
04-17-2017, 06:46 PM
|
#2
|
Human being with feelings
Join Date: May 2012
Location: PA, USA
Posts: 356
|
Yes, it works well on a Mac, too. I can't remember the default open location, but it works.
|
|
|
04-17-2017, 06:47 PM
|
#3
|
Human being with feelings
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
|
Nice! Thanks!
|
|
|
04-22-2017, 03:44 PM
|
#4
|
Human being with feelings
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
|
I am seeing some odd behavior on OSX. Using the following code works properly in Windows, but in OSX I am not able to select files that have an extension. Anything iwth an extension is greyed out.
Code:
mOpenScl = new IFileSelectorControl(this, IRECT(11, 47, 629, 77), kSCLFileSelector, &bitmap, kFileOpen, ".");
I also tried adding in extensions to the control to no avail - what am I doing wrong?
Code:
mOpenScl = new IFileSelectorControl(this, IRECT(11, 47, 629, 77), kSCLFileSelector, &bitmap, kFileOpen, ".", "scl");
mOpenScl = new IFileSelectorControl(this, IRECT(11, 47, 629, 77), kSCLFileSelector, &bitmap, kFileOpen, ".", "*");
|
|
|
04-23-2017, 05:46 AM
|
#5
|
Human being with feelings
Join Date: May 2012
Location: PA, USA
Posts: 356
|
I think if you don't specify anything (or ""), you should be able to select all file types. On OS X, I believe you just specify the extension, not the period (e.g., "txt", not ".txt").
I haven't looked too extensively, but I am wondering if the case matters on the Mac. Maybe you need to specify both types, "scl,SCL". I also wonder if it needs to be a file type that is recognized by the OS. You could try testing it by specifying something like txt and seeing if it works.
|
|
|
04-23-2017, 06:52 AM
|
#6
|
Human being with feelings
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
|
I tried multiple extensions in various iterations of case (e.g. txt, TXT, scl, SCL, etc.) to no avail. I also looked into file type associations such as associating the file with my application in OSX. Nothing has worked. My next step is to try a native dialog and see if I have the same problem to see if it's a MacOSX issue rather than an WDL/iPlug issue.
Any wisdom from those who have gone down this path successfully is gratefully received.
|
|
|
04-23-2017, 08:30 PM
|
#7
|
Human being with feelings
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
|
I got tired of fighting with it and dropped the iPlug file open dialog altogether as I was seeing other issues on top of the inability to select the files. I ended up using a small C library named aptly "Tiny File Dialogs" which works beautifully for my purposes, and tested well under both Windows and Mac OSX.
|
|
|
04-24-2017, 10:30 AM
|
#8
|
Human being with feelings
Join Date: May 2012
Location: PA, USA
Posts: 356
|
I have not had problems with OS X, but I have only ever used "txt". That appears to have worked fine. I am glad you found the other library. I am interested in the color picker. Thanks for sharing.
|
|
|
04-24-2017, 01:33 PM
|
#9
|
Human being with feelings
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
|
You are very welcome. I am relieved that I could find an easy solution to the problem, and am very glad I decided to test on OSX prior to moving too far in my plugin's code. Refactoring later would have been a huge pain.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 09:16 AM.
|