extract every code out of stack

Klaus Major klaus at major-k.de
Tue May 30 08:28:17 EDT 2006


Hi Claus,

nice to read you again :-)

> Hi,
>
> i somehow managed to mess up one of my stacks ...
> (Main stack has a preOpenStack handler, the substacks don't.
> But now some substacks perform the preOpenStack handler of the main  
> stack when opening these substacks.
> I don't have a clue how to fix that.  :-(  )

you can change the script of your mainstack like this:

on preopenstack
   if the short name of the target <> the short name of this stack then
       exit preopenstack
   end if
   ...
end preopenstack

and you are out of the tailor :-D
(Hint: literal translation of a german saying)

> Is there a way to get all the code from all the objects in all the  
> stacks?
> So i can build the whole thing again from scratch.
>
> Something like:
>
> repeat for eack stack my_stack
>   repeat for each card my_card of stack my_stack
>     repeat for each object my_object of card my_card of stack my_stack
>        put my_stack && my_card && my_object && the script of object  
> my_object of card my_card of stack my_stack after my_scripts
>     end repeat
>   end repeat
> end repeat

This is surely doable!

If you need this list for all substacks of a stack:

...
put the substacks of this stack into STList
   repeat for each line i in STList
   ## loop through all substacks

     put the num of cds of stack i into Numocds
       repeat with k = 1 to Numocds
      ## loop through all cards of this stack

         put the num of controls of cd k of stack i into Controllist
             repeat with m = 1 to Controllist
            ## loop through all objects on this card of stack
                 put i && "Card:" && k && the short name of control m  
of cd k of stack i && the script of control m of cd k of stack i  
after myList
       .....


You get the picture.

> Regards,
>    Claus.

Best

the other Klaus :-)


Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the use-livecode mailing list