Unacceptable File Size Increase

Mark Schonewille m.schonewille at economy-x-talk.com
Wed Jun 28 13:32:56 EDT 2006


Dear Blair,

There are several reasons why your stack may increase. First of all,  
as has been indicated already, you may need to compact your stack.  
However, since the Revolution IDE compacts your stack automatically  
whenever you choose Save from the File menu, I don't think this is  
the problem.

Another problem may be that you are copying a group to the substacks.  
If there is a group on the card you are copying to the substack, this  
group receives a new ID number. So, each time you add a card to the  
substack, you also add a new group and this all duplicate all objects  
and scripts in that group. If you have several thousands of cards,  
your stack will grow quickly, particularly if the scripts are long or  
if there are pictures in that group.

My advice is to make sure that you know how your stack works. You  
write you don't remember why each substack has a version of card X.  
Please, figure out why.

My second advice is not to copy any cards. You should have one  
mainstack or library with scripts that are used by all substacks. You  
also need to make substacks with groups that have their background  
behavious set to true. If you want to update the scripts, update the  
main stack or library only. If you want to transfer data, don't copy  
the cards but transfer text and imagedata only. Actually, this advice  
implies redesigning your stack.

Good luck,

Mark

--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Download ErrorLib at http://economy-x-talk.com/developers.html and  
get full control of error handling in Revolution.



Op 28-jun-2006, om 17:37 heeft Blair Morrissey het volgende geschreven:

> 4. As I revise and augment card X in the mainstack, I want to be  
> able to update the mutually similar cards in the substacks  
> preserving the content of their fields and their handler calls. On  
> card X,  there is a field which contains a version number of the  
> then current design of card X. Probably reinventing the wheel with  
> a hexangonal one, I have handlers that when called, get the current  
> version number on card X in the mainstack and then go to each  
> relevant substack which has a copy (or clone, I can't remember) of  
> a now obsolete version of card X. That is, each relevant substack  
> has its version of card X. (I have forgotten why. Most of the  
> scripting work was done two years ago.) If the script finds that a  
> substack's version of card X is now obsolete (indicated by a lower  
> version number), the script deletes the substack's now obsolete  
> version of card X and pastes the current card X into the substack.  
> The handler then proceeds in that substack to go to each card,  
> paste a copy of that substack's new version of X near each existing  
> card, transfer the data from the existing card to the one just  
> pasted (I generally do not use ID numbers of objects), and then  
> delete the old card. It does this for all cards in the substack and  
> then proceeds to the next similar substack.




More information about the use-livecode mailing list