Error saving script 8/8/16

I got an error while trying to save a script debugger script. I’ve included a picture (Error image.png) of the error and the script window contents. I also saved the console output for the previous 2 and a half hours in a file called Console output.txt. The actual name of the file that had the problem is called “Aligned sample.scpt” I included that file and a zipped file version of the file hoping if the problem is with Finder setting the zipped version might catch it.

I sampled SD after the error dialog had been up for a while (about a half an hour), then created and saved a “sample” in activity monitor and called it “Sample of Script Debugger 1” . Then I clicked the “Compile and save button.” I did another sample in activity monitor and saved that as “Sample of Script Debugger 2.”

I closed the script window, opened the same file in finder and got the error when I tried to save the file without making any changes. At this point I archive the file and made no further modifications to the file.

I made a copy of the problem file, opened that file in Finder and it opened with no problems. I pressed command-S without making any changes and no errors occurred. I changed the text on the copied file and saved it using command-S. It saved with no errors. I closed the file and reopened it from Finder and the file had the new changes in it with the text of the file intact.

I had to change the file extension from “txt” to “applescript” to get the Console output to upload. I was not able to upload a file with the file extensions of: zip or scpt. I didn’t want to change the process samples to .applescript because I wasn’t sure if that would mess them up.

I emailed you the files I couldn’t upload to you in an email titled “Files from ‘error saving script 8/8/16’ post”

Bill

Console output.applescript (3.6 KB)

That dialog is to be expected if you have top-level variables containing pointers (as you have the way you’re using Dialog Toolkit) and you haven’t turned off Persistent Properties.

I haven’t seen your files, but I’m not sure what you are referring to as a bug. Did pressing Recompile & Save not work?

It worked at the time I clicked the the button. But error dialog came back later. But every time I clicked “Recompile and Save” it saved it to disk correctly. If it wasn’t for the error dialog I would say it worked great. So I’m not really sure there is a problem as everything works fine except the dialog keeps coming back and I can’t save until I click “Recompile and Save”

I included a zipped version of the script I used. I was running simple tests to figure exactly how “Dialog Toolkit” workd because I’m trying to write documentation for “Dialog Toolkit”

Bill

Aligned sample.scpt.zip (5.9 KB)

The dialog is going to keep coming back until you turn off Persistent Properties – this is the sort of thing it’s designed for.

Now that I think about it saving changed global variables is not going to work well with persistent variables on. I kind of forgot about persistent variables. I was thinking more about the script then the problem. Sorry about that.

Bill