Code folding for Livecode 9.6.9 and up

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Code folding for Livecode 9.6.9 and up

Post by stam » Wed Feb 14, 2024 4:33 pm

bn wrote:
Wed Feb 14, 2024 1:32 pm
Here is a stack that lets you fix the problem.
Thank you once again Bernd, that works well and I've made it permanent. And thank you for fixing so quickly!

I'll post here if I encounter any other issues - so far seems rock solid and performant.

And I second @AndyP's comments about LiveCode HQ, this is just brilliant!
The cmd-K and cmd-U shortcuts are incredibly useful... this these are truly missing features I've been needing for a long time :)
Kudos!

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Code folding for Livecode 9.6.9 and up

Post by stam » Mon Feb 19, 2024 9:37 pm

bn wrote:
Wed Feb 14, 2024 1:32 pm
I wait a while for more bug reports before posting a new version of the installer for code folding.
Bernd, just wanted to thank you again -- this has made working on long scripts of hundreds of lines a breeze!
THANK YOU!!!

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Code folding for Livecode 9.6.9 and up

Post by bn » Tue Feb 20, 2024 10:09 am

Stam,
stam wrote:
Mon Feb 19, 2024 9:37 pm
Bernd, just wanted to thank you again -- this has made working on long scripts of hundreds of lines a breeze!
I thank you for feedback and all the others that tried Code Folding.
I actually found two more small bugs (beside the one you found) and am working on making the installation process a bit easier.

I restarted the project when I was debugging someones scripts with up to 6348 lines of code in one mouseUp handler...

There is one 'hidden' feature: if you right-click on a foldable line while the command key is down that toggles the folding state. Less mouse traveling.

Kind regards
Bernd

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Code folding for Livecode 9.6.9 and up

Post by stam » Tue Feb 20, 2024 12:49 pm

bn wrote:
Tue Feb 20, 2024 10:09 am
I restarted the project when I was debugging someones scripts with up to 6348 lines of code in one mouseUp handler...
Ouch!
>6,000 lines in one handler!?
I must say my attention span is not that long, I’m amazed that wasn’t split into digestible chunks… each to his/her own coding style I guess, but that just seems… wrong…

bn wrote:
Tue Feb 20, 2024 10:09 am
There is one 'hidden' feature: if you right-click on a foldable line while the command key is down that toggles the folding state. Less mouse traveling.
Good to know and very much appreciated!!

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Code folding for Livecode 9.6.9 and up

Post by bn » Thu Feb 22, 2024 2:23 pm

New version of Code Folding

Since I did not hear of further possible bugs I upload a new version of Code Folding stack.

It has in addition to Stam's report two more bug fixes.
The stack now has the option to make the temporary changes to the IDE permanent via a button
The stack now also has the option to make a backUp of the stacks that are changed to revert in case you do not want code folding anymore.
Please make the backups before making the changes to your IDE regarding code folding permanent.

As before this version has been tested with version 9.6.9 up to 10.0.0 DP-7

Kind regards
Bernd
Attachments
InstallCodeFolding15_9.6.9.livecode.zip
(88.54 KiB) Downloaded 52 times

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Code folding for Livecode 9.6.9 and up

Post by stam » Thu Feb 22, 2024 2:44 pm

bn wrote:
Thu Feb 22, 2024 2:23 pm
As before this version has been tested with version 9.6.9 up to 10.0.0 DP-7
Thank you Bernd -- is it safe to use this where the previous permanent fix was applied or should this be applied to a pristine IDE?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Code folding for Livecode 9.6.9 and up

Post by bn » Thu Feb 22, 2024 2:57 pm

stam wrote:
Thu Feb 22, 2024 2:44 pm
bn wrote:
Thu Feb 22, 2024 2:23 pm
As before this version has been tested with version 9.6.9 up to 10.0.0 DP-7
Thank you Bernd -- is it safe to use this where the previous permanent fix was applied or should this be applied to a pristine IDE?
I think you might want to apply it to a fresh installation of your version. Just to not take any chances.
Sorry for the inconvenience. But it is only a download away.

Kind regards
Bernd

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Code folding for Livecode 9.6.9 and up

Post by stam » Thu Feb 22, 2024 11:02 pm

No worries. Small price to pay :)

Fjord
Posts: 132
Joined: Sat Dec 06, 2008 6:18 pm
Location: France

Re: Code folding for Livecode 9.6.9 and up

Post by Fjord » Sun Feb 25, 2024 6:38 pm

Nice extension ! This makes the script editor way more civilized…. Thanks, Bernd !
--
François

raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

Re: Code folding for Livecode 9.6.9 and up

Post by raugert » Thu Mar 07, 2024 1:30 am

THANKS Bernd. This is a great feature for the script editor. I love it ! Only had on instance where the script editor crashed (closed) when I copy/pasted a folded command. Not a big deal.. :)

Richard
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Code folding for Livecode 9.6.9 and up

Post by bn » Thu Mar 07, 2024 9:48 am

raugert wrote:
Thu Mar 07, 2024 1:30 am
THANKS Bernd. This is a great feature for the script editor. I love it ! Only had on instance where the script editor crashed (closed) when I copy/pasted a folded command. Not a big deal.. :)
Thank you Richard,
Though I have not tested copying folded commands extensively I am surprised that it did not work as intended. Folding is not what the copy command "sees", it just sees text. Folding is strictly the appearance of text not the text itself. I retested copying folded text without problems but there might be conditions I did not test. A recipe would be welcome.
Please do report any problems with folding since it should not interfere with working in the script editor :)

Kind regards
Bernd

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Code folding for Livecode 9.6.9 and up

Post by stam » Thu Mar 07, 2024 12:14 pm

raugert wrote:
Thu Mar 07, 2024 1:30 am
THANKS Bernd. This is a great feature for the script editor. I love it ! Only had on instance where the script editor crashed (closed) when I copy/pasted a folded command. Not a big deal.. :)

Richard
I was not able to reproduce this - I copy/pasted a folder command a few times, and it just pasted unfolded with no issues.

BW
Stam

raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

Re: Code folding for Livecode 9.6.9 and up

Post by raugert » Thu Mar 07, 2024 3:19 pm

I tried to reproduce it myself but to no avail. The copy/paste works flawless every time ! It may have had nothing to do with the folding... Chalking this one up to a one time event. Thanks again Bernd for the great feature.
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 261
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Re: Code folding for Livecode 9.6.9 and up

Post by SWEdeAndy » Thu Mar 07, 2024 9:36 pm

Finally had time to test this and it works beautifully!
Great work, Bernd, and thank you so much for bringing this essential feature to LiveCode!
I'm so happy we finally have code folding! :D
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Code folding for Livecode 9.6.9 and up

Post by stam » Thu Mar 07, 2024 11:13 pm

LC Ltd need to pony up and procure this from Bernd - this is literally the first IDE interface improvement I've seen since I picked up LC properly during lockdown... it is an essential one, and very well done at that...

Post Reply

Return to “Talking LiveCode”