Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't recurse down file directories when collecting files to iterate through #289

Merged
merged 9 commits into from
Jun 11, 2023

Conversation

sdatkinson
Copy link
Owner

This PR resolves #282 by stopping NAMFileBrowserControl::ScanDirectory() from recusing down subdirectories. The result is also more in line with the experience that I'd like thee to be.

@sdatkinson
Copy link
Owner Author

Puzzling me why the macOS build fails...

@sdatkinson
Copy link
Owner Author

About the current solution:

I first tried to make ScanDirectory virtual and protected (rather than private) and override it in NAM (least intrusive solution I could think of), but I ran into issues with dirscan.h which defines WDL_DirScan trying to use a strnicmp, which would seem to be right according to the surrounding macros (trying to compile the VST3 on my MBP). But, it failed to compile, suggesting that I use strncmp instead.

that's confusing to me and sort of suggests that the macros' states are somehow different when the compiler visits dirscan.h for IControls.cpp from when it visits while compiling NeuralAmpModelerControls.h (if I #include it at the top). Perhaps delaying the definition of the override in e.g. NeuralAmpModelerControls.cpp would fix it? I tried, and it didn't seem to work.

I'd love to hear from @olilarkin if this rings any bells, though I'm happy to discuss over on iPlug2/iPlug2#979 I'd love for NAM not to impose on iPlug2, it seems to me like the amount of effort to dodge it over here would be considerable. (Though perhaps there's some more advanced C++ I could do to get around it that I'm not thinking of? Again, happy to learn!)

In short, I wanted to get this in shape for final testing so we can release 0.7.4 asap; we can sync up iPlug2 in a tidier way later on. I don't think that it's too much tech debt to resolve, and I really want to get this release out promptly--users are clamoring for the arrows feature 🙂

@sdatkinson sdatkinson merged commit cd11809 into main Jun 11, 2023
@sdatkinson sdatkinson deleted the issue-282 branch June 12, 2023 00:00
@olilarkin
Copy link
Contributor

olilarkin commented Jun 12, 2023 via email

olilarkin added a commit to olilarkin/NeuralAmpModelerPlugin that referenced this pull request Jun 12, 2023
sdatkinson pushed a commit that referenced this pull request Jun 13, 2023
* Revert "Don't recurse down file directories when collecting files to iterate through (#289)"

This reverts commit cd11809.

* Update iPlug2 for new IDirBrowseControlBase argument
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Browsing files or models in nested file directory gets stuck in bottom directory
2 participants