It doesn't save properties in the script!
  • Normally, scripts run under Apple's Script Menu, will save the properties in the script. Earlier, this also worked with FastScripts I think. However, this does NOT work in version 2.3.6 and Leopard! The reason it took me so long (many months) before I realized this, is because FastScripts keeps the properties in memory, so it appears to work as long as I do not quit FastScripts, but since it does not save the actual script to disk, it will be "forgotten" upon the next restart, or login or restart of FastScripts.
  • This is a long-term limitation of FastScripts. To be honest, my original reasoning was that I didn't want to take the cost of writing the script back out to disk after it runs. This is what it takes to get these properties to save.

    The other gotcha is in writing the script back out to disk, there are inherent risks (when I was testing this in a beta once, I managed to set the wrong flags and ended up saving without the script source!). I don't think it's extremely likely that a user's script will be seriously messed up when writing it back, but for now I'm a lot more comfortable not taking the risk.

    In short, yes this is a serious shortcoming but it's been this way forever in FastScripts, and while it's extremely annoying to people who use persistent properties, it hasn't been an issue for most people, and I am afraid of messing up their enjoyment of FastScripts.

    What I would recommend instead is to use an external persistence. If you make your script into a script bundle you could even store the persistence in a file inside your script's bundle. In general I'm not too much of a fan of the "storing the data in the script" that properties encourage, though I can see how the feature has become a useful habit for lots of scripters.

    Sorry for the shortcoming,

    Daniel
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!