/*if(path.isNil,{
path = thisProcess.nowExecutingPath; // ?? { Document.current.path };
});*/
and tested, and everything assigns path as it should:
//load from disk in my own Instr folder
Instr("bassEfx2.monoBass").path
/Users/crucial/Documents/SC3docs/Instr/bassEfx2.rtf
// load from disk in a quark folder
Instr([\allBands,\slewlock ]).path
/Users/crucial/Library/Application Support/SuperCollider/Extensions/quarks/cxaudio/Instr/allBands.scd
but this was/is broken :
Instr([\allBands,\threes ,\gated])
because it assumes that allBands is a directory and threes is the file and gated is the instr within that.
so it can't load those.
that needs to be fixed, but it would involve searching all the combinations to figure out if you meant folder or were merely adding extra dots into the name.
Then, to fix Instr:init { arg specs,outsp;path = Main.currentFile; // this line is newthis.makeSpecs(specs ? #[]);if(outsp.isNil,{outSpec = nil;},{outSpec = outsp.asSpec;});this.class.put(this);}Or maybe Instr:init should havepath = Main.currentFile ?? { Document.current.path };Any issues with this? I think it's generally useful.Oh yes, and guiBody needs to check path.notNil before calling File.exists(path) -- because it's legit to have an Instr with no path (if you create it in an unsaved document).