On the max file path:
Create a patch called "whatever.pat"
Create a js file called "whatever.js"
Open a new patch and create the object "whatever"
error: whatever: No such object
Rename the file "whatever.pat" to "whatever"
Now it works! Why doesn't it work with .pat?
I recently renamed a few patches to use the .pat extension and suddenly Max couldn't find them anymore. That was confusing! I suppose the lesson is to not use the same name for patches and js files. Should have known better...