> On 31 Jul 2017, at 3:50 am, Sannyasin Brahmanathaswami via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> "Entralled with external scripts and GIT are We" says Yoda

I have implemented a scriptifier utility script if you are interested here 
https://github.com/livecode/livecode/pull/5600 
<https://github.com/livecode/livecode/pull/5600>

It parses all objects in a stack looking for non-trivial scripts then generates 
a unique name based on object hierarchy and saves the script only stacks in a 
folder with the same name as the stack filename and sets the stackFiles 
appropriately. We have used it on some stacks in the IDE (the installer and the 
IDE startup stack) and have only found one side effect so far in an old script 
that used idle. Idle is only sent to objects that implement it and is not 
detected in their behaviors. For simplicity the script ignores any objects that 
already have behaviors as if you want a behavior hierarchy of script only 
stacks you need to script that when they are loaded.
> 
> It this bad practice? Of course it is a trivial matter to make a direct 
> assignment to the external file since it is in the stack files

My scriptifier (being a bit dumb about such matters) would do something similar 
when it encounters an object that is a behavior button used elsewhere. The 
behavior button scriipt will be exported and the hierarchy will be established. 
We haven’t noticed any issues with this although it probably wouldn’t take long 
to tweak the scriptifier to delete the button and set the behavior directly 
that would impact resource resolution like finding icons so it’s better to 
leave it in place. Such things are better done manually if necessary.

Cheers

Monte
_______________________________________________
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

Reply via email to