how to revert stack B, C and D from stack A

Claudi Cornaz claudi.c at fiberworld.nl
Sun Jan 7 10:43:00 EST 2007


Hi Mark,

Thanks for the quick reply.

All stacks are librarie stacks so they have no substacks. They also are 
all in use (well most of them)
First I download the new versions of the stacks into the bundle with 
another name
then I check if all stacks got downloaded OK. If so then I rename the 
old ones with a "~"
at the end and rename the newly downloaded ones to the name of the old 
ones. Then I
check again if all is well and if so I delete the old ones (the stacks 
with a "~" at the end)
then I like to revert all stacks that have a new version.  (I hope this 
doesn't sound to complicated
but I hope this is a safe way to do it. If anywhere in this process 
something goes wrong I can
still backout of the whole update and leave the app as it was before)

I found out what I did wrong. The defaultStack is not the same as the 
current stack. So in this case
instead of setting the defaultStack, I can just go invissible to the 
stack which was renewed
in the bundle and then do revert. This works.

I got confused between the defaultStack and the current stack. This got 
me confused the otherway round before
  when getting the mouseLoc in a librarie routine. In other words I 
wanted the mouseLoc
in my document stack but the routine was in a invissible librarie 
stack. Without setting the defaultStack I got the mouseLoc
relatieve to the librarie stack instead of my document stack, which was 
not what I needed. This one took me quite a while to discover.
after setting the defaultStack at the beginning of the handler the 
mouseLoc returned the right coordinates
relative to the document stack. (actualy I had discoverd it and forgot 
about it again till I got bitten again a year later,
and again it got me up the walls before I figured out what was going on 
and then I remembered it had happened to me before)

I plan to create a stack "Mistakes I made and things I learned" It 
could be very usefull, even for myself.

Anyway thanks a lot

Claudi


On 7-jan-07, at 14:45, Mark Schonewille wrote:

> Hi Claudi,
>
> Revert simply reads the stackfile from disk again. It doesn't only 
> revert the substacks but also the mainstack. I don't think this is 
> what you want.
>
> Perhaps you want to delete stacks stacks B, C and D and replace them 
> with a new version. First, not that this won't work if your stacks are 
> part of a standalone.
>
> delete stack B
> go to stack "/disk/folder/stackB.rev"
> set the mainstack of "stackB" to "Your Mainstack"
> save stack "Your Mainstack"
>
> Same with stacks C and D. You cannot open the new stack before 
> deleting the old one. However, you could give the new stacks a 
> different name at first. Suppose that StackB Update is a substack of 
> your updating stack:
>
> delete stack B
> go to stack "StackB Update"
> set the mainstack of "stackB Update" to "Your Mainstack"
> set the name of stack "StackB Update" to "StackB"
> save stack "Your Mainstack"
>
> I hope this gives you some ideas.
>
> Best,
>
> Mark
>
> --
>
> Economy-x-Talk
> Consultancy and Software Engineering
> http://economy-x-talk.com
> http://www.salery.biz
>
> Get your store on-line within minutes with Salery Web Store software. 
> Download at http://www.salery.biz
>
> Op 7-jan-2007, om 14:04 heeft Claudi Cornaz het volgende geschreven:
>
>> Hi all,
>>
>> Currently I am working on a updater for my app.
>>
>> I can  download the new versions of the stacks, the app is a splash 
>> with
>> a lot of seperate lib stacks.
>> In my updater stack I then have a list of stacks that need to be 
>> reverted
>> to use the new version, but how to do that? All stacks that need to be
>> reverted are invissible
>>
>> I just can't get it to work. Each time the udater stack itself gets 
>> reverted, which
>> is of course the current stack. So I tried to use send in time a 
>> "myRevert" message
>> to each stack
>>
>> on MyRevert
>>     set the defaultStack to me
>>     revert
>> end myRevert
>>
>> Alas still no dice.
>>
>> How can I do this, if somone has a suggestion please, it would be 
>> very helpfull.
>>
>> Thanks a lot,
>>
>> Claudi
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list