The following code won't work if the mxj is loaded at the same time the patch file is opened:
//gets the path of the mxj's parent patcher
private void patchPath()
_patcher = this.getParentPatcher();
_patchPath = _patcher.getFilePath().substring(0, _patcher.getFilePath().lastIndexOf('/') + 1);
You get "" as the path. If you reinitialize the mxj once the patch is loaded, then it works. Are there any plans to fix this? I'm tempted to file a bug report about this.