needs saving
Mark Schonewille
m.schonewille at economy-x-talk.com
Fri Nov 4 10:16:56 EDT 2011
Hi Peter,
As soon as a field gets focused, revolution puts "edited" into gRevStackStatus[short name of this stack]. That's a very bad trick and means that your stack is almost always "edited".
A much better way is to calculate the hash of relevant data and compare this with a new hash value. If the two hash values are different, then you need to set the dirty flag.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553
Become our partner in sales http://qery.us/16r Start selling Color Converter today. 20% commission!
On 4 nov 2011, at 15:04, Peter M. Brigham, MD wrote:
> Anyone know what the IDE uses to decide whether to ask about saving a stack when it closes? I'm trying to implement a "markDirty" routine for the Mac. I have a frontscript that catches (then passes) closefield and sets the modifiedMark of the stack, but that won't catch field contents modified by script, or changed customprops, etc, unless I comb through over 30,000 lines of code to find all the places where I change the contents of the stack, and insert a "markDirty" command. If I could intercept whatever message the IDE uses for this it would simplify things immensely.
>
> -- Peter
>
> Peter M. Brigham
> pmbrig at gmail.com
> http://home.comcast.net/~pmbrig
More information about the use-livecode
mailing list