On 07/12/2012, at 2:31 PM, tbodine wrote: > 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?)
resumeStack/suspendStack > > 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. Set a customProperty or script local of the template to the name of the data stack. Alternatively your saved file coule be just an arrayEncoded array and you set that as a script local of your template. Fine for not much data. For lots of data use a db. > > Do you foresee pitfalls with this? Is there a better way? In general a good maintainable design will separate the data from the access to it and the view of it. There can be a few layers in there (eg a db driver). Cheers -- M E R Goulding Software development services Bespoke application development for vertical markets mergExt - There's an external for that! _______________________________________________ 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