Can a script preempt substack name conflicts?

Mike Bonner bonnmike at gmail.com
Thu May 21 00:15:44 EDT 2015


Ah k.  Ty for the clarification. :)

On Wed, May 20, 2015 at 9:16 AM, J. Landman Gay <jacque at hyperactivesw.com>
wrote:

> Actually that does load it into memory. LC has to load the file to see
> what it contains. It will be in the mainstacks but not in the openstacks.
> Any reference to a stack on disk will load it, even just "there is a stack".
>
> "There is a file " doesn't load it since that construct doesn't ask for
> any info about the file content.
>
> On May 20, 2015 9:17:42 AM CDT, Mike Bonner <bonnmike at gmail.com> wrote:
> >You can check the substack names without first loading the stack into
> >memory.
> >
> >get the substacks of stack "/path/to/stackfile.livecode"
> >
> >On Fri, May 15, 2015 at 1:37 PM, J. Landman Gay
> ><jacque at hyperactivesw.com>
> >wrote:
> >
> >> On 5/14/2015 8:16 PM, David Epstein wrote:
> >>
> >>> With stack A already open, I open stack B and get a alert like this:
> >>>
> >>> "A stack "<substackName>" in file <fileName of stack A> is already
> >in
> >>> memory.  The Revolution UI does not distinguish stacks which have
> >>> identical names, so editing these stack files while both are in
> >>> memory could result in data loss.”
> >>>
> >>> Is it possible by script to intercept the message that generates
> >this
> >>> alert, and rename either the substack that is already in memory or
> >>> the substack of the stack I am trying to open, so as to avoid both
> >>> the alert and the risk of data loss?  My impression is that if I try
> >>> to learn the substack names of a file I will already be loading that
> >>> file into memory, and it will be too late to head off the alert.
> >>>
> >>
> >> I don't think it's worth it to try and hack the IDE to get around the
> >> warning. You won't lose any data unless you make changes to one of
> >the
> >> duplicate stacks and then try to save it. So what I usually do is
> >note the
> >> name of the problem stack and quit LC. Then I restart, open the stack
> >I
> >> want to change, and temporarily alter its name in the property
> >inspector. I
> >> don't save it.
> >>
> >> Then open the second stack, do whatever work is necessary, and then
> >close
> >> and remove it from memory. After that you can change the name of the
> >> original stack back to what it was again.
> >>
> >> When I know in advance I'm going to open duplicate-named stacks, I
> >just
> >> change the first stack temporarily before opening the second one. It
> >saves
> >> time.
> >>
> >> --
> >> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> >> HyperActive Software           |     http://www.hyperactivesw.com
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> use-livecode at lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >_______________________________________________
> >use-livecode mailing list
> >use-livecode at lists.runrev.com
> >Please visit this url to subscribe, unsubscribe and manage your
> >subscription preferences:
> >http://lists.runrev.com/mailman/listinfo/use-livecode
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list