Navigator now supports converting controls to script-only stack behaviors

Interested in using the many environmental add-ons and extensions from LiveCode and third parties to the flexible LiveCode environment? This is the place to talk about it.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
geoffcanyon
Posts: 53
Joined: Thu Aug 15, 2013 9:25 am

Navigator now supports converting controls to script-only stack behaviors

Post by geoffcanyon » Wed Jan 24, 2018 8:40 pm

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

geoffcanyon
Posts: 53
Joined: Thu Aug 15, 2013 9:25 am

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

Post by geoffcanyon » Thu Jan 25, 2018 10:35 am

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...)

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

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

Post by bogs » Thu Jan 25, 2018 5:20 pm

This addition sounds intriguing.
Image

Post Reply

Return to “Using Plugins for Customizing the LiveCode IDE”