Looking for tips on memory mgt in standalones

tbodine lvhdgc7 at gmail.com
Thu Dec 6 22:31:21 EST 2012


Interesting. That's the direction I'm going... a document editor that clones
a template and just stores data in the "document" stacks as a few arrays in
custom properties and formatted text fields in the stack. No code or
controls in the "documents" to avoid the update headaches you described.

If this editor is to support multiple documents open at once, then there's
the matter of knowing which is the active one at a given moment. I saw in
the Dictionary some command that tells which stack the mouse is over. Is
there something similar for keyboard focus? 

What would be ideal is an event triggered in LC when the user clicks a
different window activating another "document" stack. (In Director's Lingo
language, there's activateWindow and deactivateWindow event handlers.
Anything similar in LC?)

I expect these "documents" will all have similarly named custom properties,
so it could get messy keeping track of them with many files open. I'm
thinking that when a particular "document" is active, then its custom props
are copied to a global that would be used by the editor's code. And when
that "document" is deactivated, code would write the global back out to that
file's custom property. Then the newly selected "documents" custom props
would be loaded into the global.

Do you foresee pitfalls with this? Is there a better way? 

Many thanks for your insights.

Tom Bodine







--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Looking-for-tips-on-memory-mgt-in-standalones-tp4657895p4657908.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list