ReformatCode.xojo_script broken in 2021r3?

I’ve been using a ReformatCode.xojo_script custom code reformatting script for years, and suddenly in 2021r3 it doesn’t work any more. I thought maybe something had changed, but even putting in the script from the Xojo docs doesn’t work. I always get standard formatting, never my custom formatting.

Is this a known issue? I can’t find any mention on the Forums or Feedback.

It’s working here for me inside 2021R3.X.

API2 changes ?

It’s working for me, it’s the first thing I check on a new release.

Did you remember to turn on “Apply standardize format after ending line” in Options>Coding?

Are you using version 0.21? (this is shown on the first line of the script)

Of course. And it applies Xojo’s standard formatting, which I dislike intensely. It completely ignores my script, no matter what script code I use.

Not sure what you mean by version. Are you talking about the version of the script? There is no version on the scripts I’m using. I’ve tried my own script which has worked great for years, I’ve tried the demo in the Xojo docs, I’ve tried really simple scripts that just lowercase all text – just to prove something happens – and nothing happens except Xojo’s standard casing applies.

I’ve added in debugText calls and I don’t see them executed anywhere. It’s like the script is never being called. (And yes, I am relaunching Xojo between script changes.)

I’m completely baffled, especially if it’s working for others. I’m not even sure what else to try.

FWIW, I’m running Xojo 2021r3.1 on Mac OS Monterey 12.1 on MacBook Pro M1 Max.

macOS security / translocation reminder. Check Xojo isn’t quarantined and just failing to load the script.

Where did you get a script version 0.21? As far as I know, the last version was 0.18.

Oops, yeah, doh, internal testing build, shhh, I didn’t mention it. You saw nothing waves hand

Sorry Marc, I thought you were using my script which is why I mentioned the version thing.

I assume you’re not doing anything fancy like linking to the file instead of just popping it into the folder?

I don’t know if anyone here has an M1 to do a test of a reformat code script to remove that test as it’s the only one I can’t do. There’s a script here if you need one

As for the quarantine thing @Tim_Parnell, doesn’t the mac it let you know if this is happening?

I’ve seen folks have problems loading plugins and not realize Xojo was quarantined.
Christian has filed a ticket and made some noise, but still @Xojo hasn’t done anything to alert users when things fail to load.

You meant Xojo wouldn’t have permission to load the script from it’s own Scripts folder? Wouldn’t I get an alert to that? How do I solve that?

Correct. This is how quarantine is designed. Can’t access Plugins either – because the files are not “it’s own” when they’re outside the app.

I’ve seen alerts for apps accessing Documents without my permission, but I can’t say I recall the behavior that happens when they illegally access files next to themselves. I do know that is silent about Plugin load failures and it’s affected Christian.

1 Like


That fixed it! Thanks so much, Tim! This was driving me crazy.

I checked in System Prefs and Xojo was granted “Full Disk Access” but was somehow still quarantined.

This also solves another mystery – Xojo took a lot longer to launch and I saw it loading all the plugins. When I was doing my M1 Max benchmarking, one of the things I tested was Xojo launch times and I encountered some oddities there on different machines. I bet some were loading all the plugins and some weren’t, screwing up my benchmarks! :man_facepalming:t3:

In the past I read an easy trick to get rid of the quarantine without using the terminal.

  • Drag the program to the desktop (make sure to move the program, not making an alias)
  • Drag the program back to the Applications/Apps folder
  • The quarantine is removed. :+1:
1 Like