Getting require() to work
I have a Util script that I want to have available to other plugin scripts in a plugin via require(). All scripts are in the same directory in the plugin folder.
PluginUtils.lua:
PluginUtils = {}
function PluginUtils.fnord(arg)
-- do some stuff, return a fnorded string
end
OtherFile.lua:
require 'PluginUtils'
...
When I make a gesture that runs OtherFile, the plugin fails with an error "Could not load toolkit script: PluginUtils"
It never gets any further than that, and it truly appears to not find the required script (which runs fine when passed to the lua interpreter directly.)
This seems to trivial. What am I missing? The SDK docs have an example that shows passing require the full name of the script, but that doesn't work, either, thought the error message reflects that change.