So I was really just missing the constructor for a folder object. Is that the general syntax for constructors? (So a new, say, MasterSpread could be constructed with myMasterSpread = new MasterSpread("NameOfSpread") ?)
If only it was that simple!
The Folder class has a 'constructor' method, and it's one of the few. Others are Array, Boolean, Date, Error, File, Function, Number, Object, RegExp, Socket, String, UIEvent, and ScriptUI Window.
If I remember correctly you need a constructor if creating a new object requires more than a simply allocation of an amount of memory.
myMasterSpread = new MasterSpread("NameOfSpread");
just gives an error "MasterSpread does not have a constructor". Even if it did work, you'd have a master spread somewhere in memory -- not linked to a document or something (its 'parent' is a Document but that's a read-only property).
No, master spread is a part on InDesign's DOM -- you create it like so:
File and Folder objects are the part of Adobe ExendScript and common for all scripted applications: InDesign, Photoshop, Illustrator, etc.
Ah, I see. I think...
I have been creating various master spreads using the app.document.masterSpreads.add() method, but I'd been wondering if there were another way. Still, all is well, and the script that I was intending to write is working as I want it to, so I'm pretty happy!
Thanks again, and I'm sure I'll be bothering you with more questions later...