Tore:
> I do not do any clean up at closing time. Instead I execute
> the necessary routines as part of a preOpenStack handler.
> I then do not have to consider which way the stack was closed.
Yes! Like you, for cleanup I also avoid that how-closed consideration.
Much easier to have a simpler single trap.
Yet I ALSO avoid saving user/test data!
That keeps my files smaller in their saved state.
And if opened with messages off, still cleaner....
Bob:
> when I open the stack the next time I do not want to
> remains of what I was doing before to show.
You can! Several routes to choose. Presenting the easiest.
Me again:
> I perform cleanup when I save.
In other words, try saveStackRequest!
Don't "save" with your own code; let LC IDE do that.
Just perform your cleanup, then pass.
That way your cleaned-up stack is reliably saved.
You get the best of both - simple trap, reliable.
(However, your original method would work - if you finish it!
And while typing this, I see you already made progress; that's good.)
Tore again:
> By keeping it modular, the clean up script can also
> be started from other handlers if necessary.
Agreed!
Modularity increases performance, maintainability, and freedom.
Can't stress this enough.
Me again:
Don't think "clean up and save." Keep the twain separate.
I choose when to save, it's a conscious choice, and it fires my cleanup.
My stack is almost always saved clean.
Moreover I'm in the habit of saving (and backing up) BEFORE closing.
Habits are so important - they avoid needless suffering.
If I do forget my habit, the IDE will prompt me to save.
So I'm still OK - because I haven't disabled the system. It's my backup.
Nor do I rely primarily on that system. It's my backup. ;)
Best wishes,
Curry Kenworthy
Custom Software Development
"Better Methods, Better Results"
LiveCode Training and Consulting
http://livecodeconsulting.com/
_______________________________________________
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