What going on with Catalina

I use for the most time Mojave 10.14.6… but my Xcode rig is Catalina…
And I have find many serious problems with Catalina… there script libraries state or calling
a script libraries from a script some how cache the state and return errors.

In my Script library I have handlers that use NSWindow with NSMakeRect and it complain and error -1708. I made a new script because I was sure its was not wrong with it and save on the desktop.
I call the script libraries and now it do not complain and working.

It happens if I change anything in the running script (scpt)

Its very strange to me… this behavior…

I use: use theLib : script “ScriptLibraryName” – I use script applet for my script library

Anyone know what going on ??

It have always work in Mojave.

Lets test more…

  1. Save to applet (app) the script run…
  2. Copy the code to Run AppleScript Action in Automator and run as action (main thread) works…
  3. Run as workflow crash Automator. (that is strange)

Conclusions there is some serious problem in performSelectorOnMainThread::: on Catalina
and used with Script Libraries.

I will test Shanes script he use performSelectorOnMainThread::: in the Script Library
Its looks like there was no problem to run Shanes Dialog Toolkit examples in Catalina.

To put everything in Script Library and call a Dialog is possible. But its looks like calling some
handlers to build a dialog in a script is more cumbersome if its not run on main thread.
But maybe the issue is… the handler that is in Script Library also need to be in main thread.

I will see if that is the issue…