Re: How to suppress the Modal Purge dialog? -- Name space conflict

2021-09-20 Thread Curry Kenworthy via use-livecode


Roland:

> there are number of stacks that have the same stack name

1. Use "delete stack" to remove one from memory
before loading another. Do it carefully;
this is a powerful command! See the dictionary.

> I am not just talking about my own stacks,
> but also stacks from third parties, and opens sources

2. The first step after creating a new stack
(before adding controls) is: give it an unusual name.
This is done BEFORE the stack is ever saved.
Otherwise we see "Untitled" stacks floating around.

I'm sure Roland knows this; I'm speaking to the Community.
We also have a "so many roads" ♫ meme and fan club,
and just as with real highways, yes there are infinitely
many paths. But very few efficient ones to a destination! :)

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


Re: How to suppress the Modal Purge dialog? -- Name space conflict

2021-09-19 Thread Tom Glod via use-livecode
Sorry, right you mentioned that in one of the paragraphs. but there is
a way to get all the stacks opened... but making sure that before a
stack is processed, the name is returned to what it must be to be exported
and work.

Just making the assumption that you can only process one open stack at a
time.

Or are the stacks all running code outside of being "opened"?


On Sun, Sep 19, 2021 at 6:12 PM Tom Glod  wrote:

> Hmmm...first thing that comes to mind.
>
> Can you check if the same name is already open and then rename the
> existing one before you try to open the second one?
>
>
>
> On Sun, Sep 19, 2021 at 5:54 PM R.H. via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Hi everyone
>>
>> I have a need to programmatically open about 200 stacks, do something, and
>> the close them. In this case, for documentation reasons, I take a
>> screenshot from every stack, every card, and every substack and their
>> cards
>> to export it.
>>
>> My problem is that there are number of stacks that have the same stack
>> name
>> (apart from a different file name), and loading them into memory (opening
>> them) sometimes creates a naming conflict if a stack with the same name
>> already is loaded -- and these are library stacks, etc.
>>
>> The known modal dialog appears to allow to purge such stack. This dialog
>> seems to appear before even any error message could be intercepted.
>>
>> Can this purging be automated and the dialog be suppressed? I found no way
>> (using the "try" construct, locking messages, etc.) to suppress this
>> dialog
>> and just do the purge from script.
>>
>> I assume that it could eventually be done messing with the strack in the
>> IDE that generates the dialog. But I do not really want to do this for
>> principle reasons.
>>
>> Another way is to make sure that there are never same stack names (which
>> are only known after opening), but that is almost impossible to control
>> and
>> might break certain stack relationships -- and I am not just talking about
>> my own stacks, but also stacks from third parties, and opens sources.
>>
>> Of course, I can make sure that there are is never more than the main
>> stack
>> in memory before opening any other stack -- except the IDE stacks. But in
>> my special case this is not a good solution as the app relies heavily on a
>> number of open stacks. At least, I am still trying to find a better
>> solution.
>>
>> Maybe a good feature for future would be to support name spaces as in
>> other
>> development environments so that such naming conflicts may be avoided.
>> Stacks and other resources could then share a name space, and then there
>> is
>> only the need to have unique names within such name space. Some people
>> (including myself) already mimic this using prefixes to a name. But that
>> is
>> just a starting point and difficult to control. The concept of name spaces
>> goes beyond that.
>>
>> Any ideas ? )))
>>
>> have fun...
>> Roland
>> ___
>> 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
>>
>
>
> --
> Tom Glod
> Founder & Developer
> MakeShyft R.D.A (www.makeshyft.com)
> Mobile:647.562.9411
>


-- 
Tom Glod
Founder & Developer
MakeShyft R.D.A (www.makeshyft.com)
Mobile:647.562.9411
___
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


Re: How to suppress the Modal Purge dialog? -- Name space conflict

2021-09-19 Thread Tom Glod via use-livecode
Hmmm...first thing that comes to mind.

Can you check if the same name is already open and then rename the existing
one before you try to open the second one?



On Sun, Sep 19, 2021 at 5:54 PM R.H. via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi everyone
>
> I have a need to programmatically open about 200 stacks, do something, and
> the close them. In this case, for documentation reasons, I take a
> screenshot from every stack, every card, and every substack and their cards
> to export it.
>
> My problem is that there are number of stacks that have the same stack name
> (apart from a different file name), and loading them into memory (opening
> them) sometimes creates a naming conflict if a stack with the same name
> already is loaded -- and these are library stacks, etc.
>
> The known modal dialog appears to allow to purge such stack. This dialog
> seems to appear before even any error message could be intercepted.
>
> Can this purging be automated and the dialog be suppressed? I found no way
> (using the "try" construct, locking messages, etc.) to suppress this dialog
> and just do the purge from script.
>
> I assume that it could eventually be done messing with the strack in the
> IDE that generates the dialog. But I do not really want to do this for
> principle reasons.
>
> Another way is to make sure that there are never same stack names (which
> are only known after opening), but that is almost impossible to control and
> might break certain stack relationships -- and I am not just talking about
> my own stacks, but also stacks from third parties, and opens sources.
>
> Of course, I can make sure that there are is never more than the main stack
> in memory before opening any other stack -- except the IDE stacks. But in
> my special case this is not a good solution as the app relies heavily on a
> number of open stacks. At least, I am still trying to find a better
> solution.
>
> Maybe a good feature for future would be to support name spaces as in other
> development environments so that such naming conflicts may be avoided.
> Stacks and other resources could then share a name space, and then there is
> only the need to have unique names within such name space. Some people
> (including myself) already mimic this using prefixes to a name. But that is
> just a starting point and difficult to control. The concept of name spaces
> goes beyond that.
>
> Any ideas ? )))
>
> have fun...
> Roland
> ___
> 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
>


-- 
Tom Glod
Founder & Developer
MakeShyft R.D.A (www.makeshyft.com)
Mobile:647.562.9411
___
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