What is «class pDSC»?
I’m encountering errors in my applet because code is being interpreted to refer to «class pDSC» when it’s intended to refer to «class dscr». In my code I just write “description” but when I view the SD log it’s being interpreted as «class pDSC» for some reason and consequently returning an error because the expected class is «class dscr».
I’m using the prerelease of SD 7.0.6 if that might have anything to do with it. On macOS 10.14.2.
«class pDSC because Script Debugger uses that code for the
description property of the document class. What context are you using the term in?
I’ve (no doubt foolishly) created my own AppleScript records with description properties. I understand it’s probably foolish but it worked fine with Script Editor. I suppose that’s the point though, that it will work in some contexts but not others. It just looks so clean and AppleScript-like rather than mashing on some prefixes. It works fine in Script Debugger too some of the time, but other times I have to explicitly use «class dscr» to avoid confusion with «class pDSC».
In case you didn’t think I was mad enough, other properties of my records include type, date and name. There doesn’t seem to be any issues with those (so far).
Right. It also has other consequences, such as being unusable with AppleScriptObjC. It’s not a good idea.
That’s what I was afraid to hear. I’m not looking forward to rewriting everything as I don’t think simple old find and replace will be up to the job, and it’s a pretty long script. Oh well, I only have myself to blame.
Don’t forget that Script Debugger supports grep search and replace.
As does BBEdit, which would be my RegEx tool of choice.