BR: TableListBoxTutorial doesn't find TableData.xml

When i build the TableListBoxTutorial on macOS BigSur with Xcode 12 the resulting app doesn’t find the Resources/TableData.xml out of the box. It seems that getCurrentWorkingDirectory() returns the root.

I think it is mentioned at several places that getCurrentWorkingDirectory() is undefined/random for a GUI application. It might have been started from a terminal or just as well by clicking on it in the finder/explorer. What value would you expect?

EDIT: that call should be indeed removed from the tutorial.


I would expect nothing. As you noticed it is done (badly) like that in the tutorial.

auto dir = juce::File::getCurrentWorkingDirectory();

It has worked, but now it doesn’t anymore. I was just pointing out the issue.

I’ve made a pending change to this tutorial so that the program now prompts the user for an appropriate TableData file on launch, rather than trying to locate the file automatically. The change should be made public on our next JUCE release.

1 Like