Another reason I so dislike the LC IDE

J. Landman Gay jacque at hyperactivesw.com
Fri Oct 12 14:34:34 EDT 2012


On 10/12/12 9:09 AM, FlexibleLearning.com wrote:
> When I close a stack, the LC IDE insists on asking if I want to save it even
> when unnecessary (auto-save is built in).
>
> I have tried these to no avail...
>
> on closeStack
>    lock messages
>
> on suspendStack
>    lock messages
>
> on closeStackRequest
>    lock messages
>
> Anything else? The culprit looks like an IDE backscript, but darned if I can
> find it and I cannot trace into it.

That's the one thing that bugs me the most too. Here's the fix:

  put "" into gREVStackStatus[the short name of this stack]

The problem is that it will get reset quite a lot, and you can't trap it 
on closestack because the IDE gets the closestack message first. I don't 
try to fix it very often because you have to manage it everywhere, but I 
have a couple of stacks where LiveCode's dirty flag only occurs on 
closefield, and so I insert it into a closefield handler to clear things 
out.

Since I do open stacks in both LC and MC, I wrote this handler:

on clearRevGlobal
   if there is no stack "mctools" then
     global gREVStackStatus
     put "" into gREVStackStatus[the short name of this stack]
   end if
end clearRevGlobal

Then I just call that repeatedly as needed.

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




More information about the Use-livecode mailing list