Page 1 of 1

Navigator now supports converting controls to script-only stack behaviors

Posted: Wed Jan 24, 2018 8:40 pm
by geoffcanyon
I now have an alpha version of Navigator that is built entirely using script-only stack behaviors, and it includes the function I used to do it. You can download Navigator 5 here. The full documentation is here, but briefly:

You can highlight any controls in Navigator, including bookmarked controls, and select Convert to Script-only Stack Behaviors on the Script menu.
  • Navigator will convert all the scripts of the objects you selected to script-only behaviors, and update appropriately all the behavior settings and stackfiles to make it work.
  • You can select the folder you want to create the new stackfiles in.
  • Navigator offers to put a log of exactly what it did in the message box.
  • If any chained behaviors included, Navigator will include the lines of script you need to run to make them work whenever you load the project.
  • Navigator will optionally work on controls with empty scripts, so you can "pre-behavior" a project before starting to script it.
I think this is completely functional and safe to use. BUT I've only tested on local projects that I created (including Navigator). Use at your own risk, always work on a copy, etc., etc.

TBD:
  • Recursive conversion, so you can select a group, card, or stack, and just say, "Convert everything in here."
  • Customizable stack names for the script-only stacks. Currently it's stack name, control name, control id, and an index if there is a collision.
If you have any feedback or questions, let me know.

gc

Re: Navigator now supports converting controls to script-only stack behaviors

Posted: Thu Jan 25, 2018 10:35 am
by geoffcanyon
I found one bug: if you try to save the script-only stacks in the same folder as any of the stacks containing the objects you're converting, the conversion process will hang partway through. The hang should occur before anything has been changed, but still: Don't Do This.

I have a fix coded, but I'm in the middle of another update, so I will update the whole thing tomorrow morning. (This is the sort of thing GitHub is supposed to be good for, right? Heh -- need to figure that out...)

Re: Navigator now supports converting controls to script-only stack behaviors

Posted: Thu Jan 25, 2018 5:20 pm
by bogs
This addition sounds intriguing.