COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 04-17-2017, 06:41 PM   #1
michaelwayneharwood
Human being with feelings
 
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
Default 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?
michaelwayneharwood is offline   Reply With Quote
Old 04-17-2017, 06:46 PM   #2
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

Yes, it works well on a Mac, too. I can't remember the default open location, but it works.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-17-2017, 06:47 PM   #3
michaelwayneharwood
Human being with feelings
 
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
Default

Nice! Thanks!
michaelwayneharwood is offline   Reply With Quote
Old 04-22-2017, 03:44 PM   #4
michaelwayneharwood
Human being with feelings
 
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
Default

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, ".", "*");
Attached Images
File Type: png osx_fileselector.png (42.0 KB, 242 views)
michaelwayneharwood is offline   Reply With Quote
Old 04-23-2017, 05:46 AM   #5
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

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.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-23-2017, 06:52 AM   #6
michaelwayneharwood
Human being with feelings
 
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
Default

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.
michaelwayneharwood is offline   Reply With Quote
Old 04-23-2017, 08:30 PM   #7
michaelwayneharwood
Human being with feelings
 
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
Default

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.
michaelwayneharwood is offline   Reply With Quote
Old 04-24-2017, 10:30 AM   #8
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

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.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-24-2017, 01:33 PM   #9
michaelwayneharwood
Human being with feelings
 
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
Default

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.
michaelwayneharwood is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:09 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.