dark mode, syntax coloring, and code folding
Moderator: Klaus
dark mode, syntax coloring, and code folding
So happy to join the LiveCode family and (hopefully) say farewell to JavaScript. That said, I have a few suggestions while LC10 is in development.
In the script editor I also would like dark mode, syntax coloring, and code folding.
It would also be nice to change the size of palettes, which are tiny and hard to read on a large monitor.
In the script editor I also would like dark mode, syntax coloring, and code folding.
It would also be nice to change the size of palettes, which are tiny and hard to read on a large monitor.
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: dark mode, syntax coloring, and code folding
Welcome aboard.
As we explore the strengths and weaknesses of different systems, I find it helpful for me to hear how people arrive here.
What did you find off-putting with JavaScript?
Do you have previous experience with HyperCard or similar scripting?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: dark mode, syntax coloring, and code folding
+1
Theming (syntax colouring, dark mode etc) would be an optional nice feature, but code folding would be extremely useful, if not essential for long scripts...
Re: dark mode, syntax coloring, and code folding
Hi.
Do you mean things like the "tools" palette? The reason I ask is twoFold:
1- Everything in LC is a stack, and one can hack into that fact at one's pleasure. Oh, and peril.
2- That said, if you try to, say, set the loc of stack "revTools", no problem. But if you try to set the rect of that stack, you will not get an error, but you also will not change that rect. You can certainly hack into the IDE and find where that gets buried. Watch out for the peril.
Craig
Do you mean things like the "tools" palette? The reason I ask is twoFold:
1- Everything in LC is a stack, and one can hack into that fact at one's pleasure. Oh, and peril.
2- That said, if you try to, say, set the loc of stack "revTools", no problem. But if you try to set the rect of that stack, you will not get an error, but you also will not change that rect. You can certainly hack into the IDE and find where that gets buried. Watch out for the peril.
Craig
Re: dark mode, syntax coloring, and code folding
Thanks for the welcome, Richard. Like many others, I was bitten by the HyperCard bug way back. I used it in an elemtary classroom. One Mac and 30 kids, yet the cooperation and shared imagination among them was astonishing. The only other software to come close was ChipWits and U. of Berkley’s Snap!FourthWorld wrote: ↑Tue Nov 30, 2021 6:48 pmWelcome aboard.
As we explore the strengths and weaknesses of different systems, I find it helpful for me to hear how people arrive here.
What did you find off-putting with JavaScript?
Do you have previous experience with HyperCard or similar scripting?
I drifted into Macromedia Director, then mFactory mTropolis (pause a moment for the beloved mTroplis and obligatory curse on Quark for quashing it). Eventually I started making web pages. HTML and CSS are intuitive to me, but JavaScript is not. I have an app, for instance, for interactive fiction, that uses a small hypertext engine written in JavaScript. I can create interactive quizzes or stories with HTML/CSS, but am largely clueless as to how the JavaScript works or how I might expand it without pestering the author (who to date has been generous, but urges me to learn how to code). JavaScript does not work like I think; LiveScript does. It’s like programming in pseudocode, with a lot of the fiddly-bits taken care of (esp. semicolons).
LiveCode was always on the horizon, but I need web apps and web pages, not stand-alones. Then came the announcement of LC10 with its faster web engine (goodbye 26 Mb start-up). Now it feels whole circle; here I am chatting with one of the gurus of X Talk languages and noticing many others (Jeanne DeVoto still around?).
I think the future of the web is WebAssembly and, who knows, may one day offer online courses leveraging the approachability of LiveCode with the power of WASM. To that end, I am trying to absorb as much as I can before posting noob questions. There are many LC examples, but some go back a decade or more, same with documentation, so I have just been trying things and seeing whether they break. BTW, I would be happy to share the interactive fiction template and invite help converting it to LC10.
Re: dark mode, syntax coloring, and code folding
Great stuff, Craig. LC10 > Contents > Tools > etc to the Tools Pallet opens the Tools pallet, as if I pressed Command T, not a stack that I can edit. What am I missing or doing wrong?
Re: dark mode, syntax coloring, and code folding
Nothing. LC is rather protective of its own. But it is just a stack, and lives in the IDE. Try this:What am I missing or doing wrong?
Code: Select all
edit the script of stack "revTools"
Code: Select all
answer random(9999)
Does this mean you have hacked into a building block of the IDE? Yes. Does this mean you can change the rect of the stack? No. I rarely get into this, but I would have bet there is a setProp handler in there that diverts such shenanigans away from unwary users. I don't, in fact see such a handler anywhere, but that means nothing. Others might chime in on why one cannot get past that level of control over that stack.
Anyway, If you want bigger tools palette, write your own. In fact, this is an excellent project for you. Do you know how to create a new button, say, just as if you dragged one from the regular tools palette? Can you simulate dragging one from your new gadget?
Make it colorful while you are at it.
Craig
Re: dark mode, syntax coloring, and code folding
cookiejar-
If you don't mind a script editor that doesn't come in the original box, the glx2 script editor has code folding, dark mode (chalkboard) and to a certain extent syntax coloring.
https://github.com/mwieder/glx2ScriptEditor
That said, if you check "Show IDE Stacks in Lists" in the "View" menu you will see all the IDE stacks in the Project Browser. From there you can edit the scripts and possibly save the changes, depending on what your operating system will allow. Lots of hacking possibilities, and easy ways to get yourself into Good Trouble. Make backup copies.
If you don't mind a script editor that doesn't come in the original box, the glx2 script editor has code folding, dark mode (chalkboard) and to a certain extent syntax coloring.
https://github.com/mwieder/glx2ScriptEditor
That said, if you check "Show IDE Stacks in Lists" in the "View" menu you will see all the IDE stacks in the Project Browser. From there you can edit the scripts and possibly save the changes, depending on what your operating system will allow. Lots of hacking possibilities, and easy ways to get yourself into Good Trouble. Make backup copies.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev