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
> pmb...@gmail.com
> http://home.comcast.net/~pmbrig


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to