Re: loss of access to stacks after "save as"

2016-11-04 Thread Mark Waddingham
You should be able to - yes.

If that doesn't work then it is possible that something in the environment (in 
the IDE potentially) is holding a reference to the stack by filename and not 
name. The question then, though, is how to find out what.

Mark.

Sent from my iPhone

> On 4 Nov 2016, at 19:37, Dr. Hawkins  wrote:
> 
>> On Fri, Nov 4, 2016 at 12:24 PM, Mark Waddingham  wrote:
>> 
>> I suspect it will be because you are referencing your stacks by (the old)
>> filename somewhere else and not name - thus causing the engine to load in
>> the old file, the stack in which has the same name as the existing stack in
>> memory.
>> 
>> 'Saving as' does not create a new stack (in memory) it just saves the
>> stack which is in memory to disk in a new file.
>> 
>> Putting it another way, the 'new' stack is already loaded as it is the
>> same stack as it was before - the only things which have changed is the
>> stacks filename property and there being a new file on disk.
> 
> Hmm.
> 
> I started with a bare "save as", and had to add other pieces to make it
> work (but I forget why now).
> 
> Can I reduce it to just "save as" and be on my merry way?
> 
> 
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> ___
> 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

___
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: loss of access to stacks after "save as"

2016-11-04 Thread Dr. Hawkins
On Fri, Nov 4, 2016 at 12:24 PM, Mark Waddingham  wrote:

> I suspect it will be because you are referencing your stacks by (the old)
> filename somewhere else and not name - thus causing the engine to load in
> the old file, the stack in which has the same name as the existing stack in
> memory.
>
> 'Saving as' does not create a new stack (in memory) it just saves the
> stack which is in memory to disk in a new file.
>
> Putting it another way, the 'new' stack is already loaded as it is the
> same stack as it was before - the only things which have changed is the
> stacks filename property and there being a new file on disk.
>

Hmm.

I started with a bare "save as", and had to add other pieces to make it
work (but I forget why now).

Can I reduce it to just "save as" and be on my merry way?


-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
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: loss of access to stacks after "save as"

2016-11-04 Thread Mark Waddingham
I suspect it will be because you are referencing your stacks by (the old) 
filename somewhere else and not name - thus causing the engine to load in the 
old file, the stack in which has the same name as the existing stack in memory.

'Saving as' does not create a new stack (in memory) it just saves the stack 
which is in memory to disk in a new file.

Putting it another way, the 'new' stack is already loaded as it is the same 
stack as it was before - the only things which have changed is the stacks 
filename property and there being a new file on disk.

Mark.

Sent from my iPhone

> On 4 Nov 2016, at 19:15, Dr. Hawkins  wrote:
> 
>> On Fri, Nov 4, 2016 at 12:11 PM, Mark Waddingham  wrote:
>> 
>> Therefore when you subsequently reference the stack by its old filename
>> (in the delete) it will load the old stackfile, thus triggering the process
>> that occurs when you try to load a stack into memory when one with the same
>> name already exists.
> 
> OK--but so how do I get rid of the old stack, and get the new one loaded.
> 
> This is the only place where I use the filename rather than the stack name
> (ok, I compute them on initial load, too).
> 
> If I don't delete the old stack, I get the messages that I have two stacks
> with the same name, etc.
> 
> thanks
> 
> 
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> ___
> 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

___
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: loss of access to stacks after "save as"

2016-11-04 Thread Dr. Hawkins
On Fri, Nov 4, 2016 at 12:11 PM, Mark Waddingham  wrote:

> Therefore when you subsequently reference the stack by its old filename
> (in the delete) it will load the old stackfile, thus triggering the process
> that occurs when you try to load a stack into memory when one with the same
> name already exists.
>

OK--but so how do I get rid of the old stack, and get the new one loaded.

This is the only place where I use the filename rather than the stack name
(ok, I compute them on initial load, too).

If I don't delete the old stack, I get the messages that I have two stacks
with the same name, etc.

thanks


-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
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: loss of access to stacks after "save as"

2016-11-04 Thread Mark Waddingham
If you save a stack with a new filename, then that changes it filename property.

Therefore when you subsequently reference the stack by its old filename (in the 
delete) it will load the old stackfile, thus triggering the process that occurs 
when you try to load a stack into memory when one with the same name already 
exists.

After the save as you don't need to delete the stack by its old filename, as 
the stack is already loaded (you just saved it!).

Generally I would recommend not using filenames to reference stacks except to 
load them - once in memory you are better off using just the (short) name.

Hope this helps!

Mark.

Sent from my iPhone

> On 4 Nov 2016, at 18:06, Dr. Hawkins  wrote:
> 
> I have a bmpVrsn routine to update the revision numbers of my various
> stacks.
> 
> Once the calculations are done, I
> 
> *close* stack stk
> 
> *save* stack stk as newFlNm
> 
> *delete* stack oldFlNm
> 
> So stk might be "rawForms", which was in file rawForms.161103a.livecode
> (oldFlNm), and now rawforms.161103b.livecode (newFlNm).
> 
> Immediately, I tend to get the message asking what to do with stack nwFlNm
> because oldFlNm is being loaded.
> 
> Some other updates are done after that--and can't access the new stack.
> E.g.,
> 
> send "boo!" to stack "rawForms"
> 
> 
> fails with no such stack found.
> 
> The first problem was present under 7; the second seems to be new to 8.
> 
> Any ideas?
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> ___
> 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

___
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


loss of access to stacks after "save as"

2016-11-04 Thread Dr. Hawkins
I have a bmpVrsn routine to update the revision numbers of my various
stacks.

Once the calculations are done, I

*close* stack stk

*save* stack stk as newFlNm

*delete* stack oldFlNm

So stk might be "rawForms", which was in file rawForms.161103a.livecode
(oldFlNm), and now rawforms.161103b.livecode (newFlNm).

Immediately, I tend to get the message asking what to do with stack nwFlNm
because oldFlNm is being loaded.

Some other updates are done after that--and can't access the new stack.
E.g.,

send "boo!" to stack "rawForms"


fails with no such stack found.

The first problem was present under 7; the second seems to be new to 8.

Any ideas?
-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
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