Mapping handler dependencies

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 324
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Mapping handler dependencies

Post by SWEdeAndy » Tue Sep 12, 2023 8:37 pm

jacque wrote:
Thu Aug 31, 2023 7:55 pm
Is there a way to exclude the entire substack?
There is now! :D

1.1.4 (12 Sep 2023)
- Enhancement: Individual substacks can now be excluded from mapping/analysis by clicking the substack name in the stacks list. Excluded stacks/substacks are italic in the list.
(If a mainstack is excluded, its substacks are automatically excluded, like before.)
WISscrdep114.png

https://github.com/wheninspace/WIS_Scri ... ses/latest
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Mapping handler dependencies

Post by jacque » Wed Sep 13, 2023 4:45 pm

There's just no stopping you, is there? 😂
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Mapping handler dependencies

Post by mwieder » Wed Sep 13, 2023 4:57 pm

Yeah. I'm running out of things on my wishlist. :roll:

Just for fun a while back I started looking into a gource-style display of handler dependencies, and while it was a fun project I'm not sure it gave any more insight into the code complexity than a mermaid-based display.

https://opensource.com/business/16/8/intro-to-gource

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 324
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Mapping handler dependencies

Post by SWEdeAndy » Wed Sep 13, 2023 8:16 pm

jacque wrote:
Wed Sep 13, 2023 4:45 pm
There's just no stopping you, is there? 😂
punIntended.png
punIntended.png (6.69 KiB) Viewed 100663 times
8)
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 324
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Mapping handler dependencies

Post by SWEdeAndy » Thu Nov 30, 2023 9:51 pm

New version of WIS_ScriptDependencies available:

v1.1.5 (30 Nov 2023)
- Enhancement: Flowcharts can now be produced and exported as PNG or SVG. On Windows and Linux the flowchart is now always displayed in-stack, as a PNG. On all platforms the flowchart can be exported as PNG, SVG and HTML.
- Enhancement: Node text size can now be set
- Adjustment: Handler type naming convention changed in LC10 (apparently), making ”M” mean ”on” and ”C” mean ”command” (and changing ”PM” into ”CM” for ”private command”). This is now correctly handled when using WIS_ScriptDependencies in either LC9 or LC10.
- Fixed bug: Arrow colouring failed for private commands/functions
- Fixed bug: The (rarely used) constructions ”before *command name*” and ”after *command name*” now get included in analysis and flowchart (displayed as ”command *command name*”).
- Other minor fixes

Download link: https://github.com/wheninspace/WIS_Scri ... ses/latest
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Mapping handler dependencies

Post by mwieder » Thu Nov 30, 2023 9:56 pm

"PM -> CM"?

Should that read PM -> PC ?

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 324
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Mapping handler dependencies

Post by SWEdeAndy » Thu Nov 30, 2023 10:00 pm

mwieder wrote:
Thu Nov 30, 2023 9:56 pm
"PM -> CM"?

Should that read PM -> PC ?
Indeed it should, my bad! Thanks!
In the script I got it right, fortunately! :D
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com

speedbump1981
Posts: 18
Joined: Fri Aug 08, 2014 7:24 am

Re: Mapping handler dependencies

Post by speedbump1981 » Sun Dec 03, 2023 11:50 pm

This is from the Mailing List:
3. Hmm, I don’t usually use any gray texts. All texts are black, except for a few big buttons that have ”midnight blue” text, which is also the colour of most of the icons. Is something happening to the UI on Linux? It would be interesting to see a screenshot of how it looks for you.
3 dec. 2023 kl. 19:00 skrev Derek Bump via use-livecode <use-livecode@lists.runrev.com>:
...
3. The teal backgrounds and gray text throughout the UI blends together and disappears when I look at it.
My apologies, when I noted I was having trouble seeing the "gray text", I hadn't yet realized that Dark Mode was clashing with your color scheme. I set the foreground color to Black and I was able to read things again.

Thanks for the help. I've been refactoring some pretty long scripts with the profiler, so I'm really looking forward to seeing what kinds of optimizations I can achieve with this in my workflow. Great work! :D
Attachments
dark-mode-2.png
Changed the Foreground Color to black, making it easier for me to read the text.
dark-mode-1.png
Linux Mint with the default Dark Mode styling.

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 324
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Mapping handler dependencies

Post by SWEdeAndy » Wed Dec 13, 2023 8:17 pm

Latest WIS_ScriptDependencies update:

v1.1.6 (12 Dec 2023)
- Enhancement: If the Kroki service is down, so no png/svg can be produced, a dialog is presented giving the choice to render the flowchart as html instead
- Enhancement: Improved design of the help section and the flowchart settings pane
- Enhancement: Mermaid version can now be modified (affects html rendering only). This is not something you’d normally need to do, but it has turned out that the latest versions of Mermaid implement some kind of hard limit on the number of edges, preventing large flowcharts from rendering. So for now, Mermaid v10.5.1 is default (no edge limit), but can be changed to a later version by advanced users.
- Fixed bug: Some actions in the mainstack triggered flowchart updates even if the flowchart substack was closed
- Other minor fixes (Among them explicit setting of fore/background color for text fields, to prevent dark mode surprises. One day I might even implement a dark mode theme... :) )

Download link:
https://github.com/wheninspace/WIS_Scri ... ses/latest
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com

speedbump1981
Posts: 18
Joined: Fri Aug 08, 2014 7:24 am

Re: Mapping handler dependencies

Post by speedbump1981 » Thu Dec 14, 2023 11:31 pm

SWEdeAndy wrote:
Wed Dec 13, 2023 8:17 pm
- Other minor fixes (Among them explicit setting of fore/background color for text fields, to prevent dark mode surprises. One day I might even implement a dark mode theme... :) )
Thank you! :D

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 324
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Mapping handler dependencies

Post by SWEdeAndy » Mon Jan 15, 2024 7:28 pm

A minor WIS_ScriptDependencies update:

v1.1.7 (15 Jan 2024)
- Fixed bug: In LC10, ”on” handlers did not get correct arrow colouring when highlighting the node
- Enhancement/fix: Private functions now have the correct node colour, and a different node shape, to distinguish them from private commands

Download link:
https://github.com/wheninspace/WIS_Scri ... ses/latest
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com

Fjord
Posts: 145
Joined: Sat Dec 06, 2008 6:18 pm

Re: Mapping handler dependencies

Post by Fjord » Tue Nov 12, 2024 10:16 pm

I'm currently using the code flow chart to help me with a 7 stacks project and I DO like it!
Which made me think of a feature (in case you need an idea. ;-)
add a check box to show/hide private handlers in the flowchart
Thanks for the great features!
--
François
--
François

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 324
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Mapping handler dependencies

Post by SWEdeAndy » Tue Nov 12, 2024 10:26 pm

Thanks for the feedback! I’m happy you find the tool useful!
It’s a good idea to add that feature. I’ll look into it soon.

I was anyway planning to push an update, as the Windows browser framework has been upgraded in the latest LC versions, so that Mermaid code can now run in the browser widget also on Windows.
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 324
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Mapping handler dependencies

Post by SWEdeAndy » Fri Nov 22, 2024 7:57 pm

A new WIS_ScriptDependencies update:

1.2.0 (22 Nov 2024)
Finally, in the most recent versions of LiveCode, the browser widget on Windows is upgraded and can run Mermaid code! Hence the version number jump-up! :)
- Enhancement: Flowcharts can now be displayed in the browser widget also on Windows, when using LC versions 9.6.13 (rc and stable), 10.0.0 (rc or stable) and all 10.0.1+ versions as well as LC Create native in classic mode.
- Enhancement: Added a settings pane for which handler types to include/exclude. The setting is global, not per project. Default is to include all handler types.
- Enhancement: Implemented code formatting/colouring in the code display field
- Fixed bug: Some flowchart nodes (handler names) were not correctly styled

Download link:
https://github.com/wheninspace/WIS_Scri ... ses/latest

Special hint for Fjord:
Here you can opt to exclude private commands/functions as well as any other combination of handler types:
Settings1.png
Settings1.png (8.29 KiB) Viewed 12351 times
.
settings2.png
settings2.png (7.61 KiB) Viewed 12351 times
After changing this setting, you need to rerun the mapping and analysis (the graphing code is too complex to only do the filtering there, I discovered).
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com

stam
Posts: 3062
Joined: Sun Jun 04, 2006 9:39 pm

Re: Mapping handler dependencies

Post by stam » Fri Nov 22, 2024 9:16 pm

Stellar work Andreas!

Post Reply