7.0 Issues

Mark Wieder mwieder at ahsoftware.net
Sun Mar 23 12:19:42 EDT 2014


Mats-

Sunday, March 23, 2014, 4:10:28 AM, you wrote:

> As rIDE has saved itself upon closing, I too now only have two feet.
> I will change this for rIDE 4.0. I ask for guidance and opinions here on
> what would be best practice and the pros and cons of different approaches?

I don't know about "best", but here are some techniques I've adopted
(and the changes in my behavior are a direct result of the changing
file format and the need to maintain compatibility with earlier
versions):

When I work on a plugin stack I use LC 4.6.4, as this is the last
version to use the 2.4 format natively. That way when I save a plugin
stack's changes I can be sure that the format hasn't changed. If I
didn't need to maintain compatibility back to earlier versions I could
use a later LC version, but in any event the native format of the
selected version of LiveCode is what's important.

I save a preferences file in the plugin directory and write any values
I want to remain persistent into that file. This replaces my previous
behavior of setting custom properties and saving the stack. In general
I save information into this text file in the format

property value

so that it can also be edited by any text processor if necessary.
Property names are single words, no spaces or punctuation.

I have somewhat standardized boilerplate routines that read the
preferences file on opening the stack and set plugin stack properties
accordingly. Preference file contents are written when necessary (when
one of them changes; or in the case of a preferences panel, when the
Save button is clicked rather than the Cancel button). I think GLX2
still saves all its settings on quitting, but I'm too lazy to check
right at the moment.

I no longer use the save-stack-and-revert trick to update a running
plugin stack because of the problem with maintaining version and
format compatibility.

-- 
-Mark Wieder
 ahsoftware at gmail.com

This communication may be unlawfully collected and stored by the National 
Security Agency (NSA) in secret. The parties to this email do not 
consent to the retrieving or storing of this communication and any 
related metadata, as well as printing, copying, re-transmitting, 
disseminating, or otherwise using it. If you believe you have received 
this communication in error, please delete it immediately.





More information about the use-livecode mailing list