Cantmodify tips

J. Landman Gay jacque at hyperactivesw.com
Fri Apr 3 17:26:55 EDT 2009


David Bovill wrote:
> I'd like to set up my stacks so that the Rev IDE asks me to save he stack -
> only when I have made a structural change. I'm looking at some mix of
> cantmodify, destorystack/window or closestack or....?
> 
> I have a number of stacks that display info - text lists indexes, and
> naturally these change whenever I use them. I don't want the IDE to ask we
> to save the stack when I close it in these circumstances. However when I
> edit the controls (move them, change a property) or any of the scripts I'd
> like to be reminded to save the stack - is this set up even possible? I
> guess it boils down to a:
> 
> canModifyTextorFileNames property
> 
> Maybe thats a feature request :)

I have a number of stacks like that. There is a Rev global 
"gREVallowSaveStackRequest" which, if set to false, does not trigger any 
save prompts. This is global though, so it won't prompt you to save any 
other stack either until you (or the IDE) set it back to true. You'd 
have to put scripts into each stack to toggle that global at appropriate 
times, which can involve a lot of event trapping.

Another way is to: put empty into gREVstackStatus["myStackName"]. An 
changed stack has "edited" as a value in that array, and empty if it is 
unedited. If the value is empty, Rev thinks the stack is unchanged and 
won't ask you to save it. This is safer than setting a global because it 
only applies to one stack, but Rev sets this value for almost anything 
you do. After accounting for all the event trapping I'd need to do, I 
stopped trying. Adding all that to several stacks wasn't worth the trouble.

Instead, I just started opening those particular stacks in MetaCard, 
where the behavior you describe is the default, and it leaves me alone 
without my having to do anything special.

It would be a good feature request.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the Use-livecode mailing list