When developing I often save the whole stack with an increasing version number. When going back to a previous version it can be hard to detect the differences between two versions.
There are probably many solutions out there to tackle this problem.
I used the diff library that is included in LC since version 9 to make a GitHub style diff that helps to show the differences.
This might also be useful to others. Click on the question mark to see a help text.
Kind regards
Bernd
Compare versions of Scripts using Diff Library
Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller
Compare versions of Scripts using Diff Library
- Attachments
-
- Find Differences in code_0.4.livecode.zip
- (7.78 KiB) Downloaded 118 times
-
maxwellhart89
- Posts: 1
- Joined: Fri Apr 03, 2026 7:35 am
- Contact:
Re: Compare versions of Scripts using Diff Library
That’s a useful approach, especially for tracking script changes across stack versions. Does your diff also handle object properties and UI changes, or mainly code differences?
Re: Compare versions of Scripts using Diff Library
Bernd.
Oooh. Will check this out.
Craig
Oooh. Will check this out.
Craig
Re: Compare versions of Scripts using Diff Library
The stack has 2 fields where you put the scripts to compare. You can use the whole scripts with all handlers and put them into their fields ("old" and "new"). If you put two completely different texts the diff can take a long time and you might want to interrupt it with command + ".".
The stack does not check whole stacks or anything else you want to compare.
Kind regards
Bernd
The stack does not check whole stacks or anything else you want to compare.
Kind regards
Bernd
Re: Compare versions of Scripts using Diff Library
This is a really useful idea. I’ve also found it difficult to track changes when working with multiple saved versions of a stack. A GitHub-style diff view makes comparing versions much faster and easier. Thanks for sharing this!
Re: Compare versions of Scripts using Diff Library
I’m working on something that could be used to track other changes besides scripts. I have not added tracking yet to handle deleted objects, but it catches most changes. It needs to be used with a git repository.maxwellhart89 wrote: Fri Apr 03, 2026 7:38 am That’s a useful approach, especially for tracking script changes across stack versions. Does your diff also handle object properties and UI changes, or mainly code differences?
https://github.com/Milby-Computer/hxt-bst
