GLX2 script editor released for Revolution

Find out what's going on with LiveCode (the company), product releases, announcements, and events.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Martin Koob
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 256
Joined: Sun May 27, 2007 8:19 pm

Re: GLX2 script editor released for Revolution

Post by Martin Koob » Mon Apr 06, 2020 7:21 pm

Several things that were previously working were fixed until they broke, then refactored until they worked again.
I liked this line. Been there, done that. :D

Looking forward to trying this out. Thanks.

Martin

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

Re: GLX2 script editor released for Revolution

Post by mwieder » Mon Apr 06, 2020 8:22 pm

If it ain't broke, fix it until it is. :P

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

Re: GLX2 script editor released for Revolution

Post by bogs » Mon Apr 06, 2020 8:34 pm

I seem to remember that kind of thinking during the WPA years, you know, make work projects :twisted: ....
Image

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

GLX2 script editor 4.1

Post by mwieder » Fri May 22, 2020 4:22 am

I have moved the repository from bitbucket to github.
This is the latest build. It's now glx2ScriptEditor version 4.1.
Release notes and a documentation wiki are on the github site.
It's had a pretty rigorous shakedown cruise lately on osx, windows, and linux.

https://github.com/mwieder/glx2ScriptEditor

kdjanz
Posts: 300
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: GLX2 script editor released for Revolution

Post by kdjanz » Sat May 23, 2020 5:23 am

Stupid newbie question but... How do you make it work?

I put it in my plugins folder so that glx2ScriptEditor.rev and glx2Plugins.txt were at the root of the folder and then restarted LiveCode. I got the display bar under my toolbar, and when I chose glx2 from the plugins submenu, I could go through the prefs. When I started to edit a script though I got the same old IDE. I looked in the wiki and the release notes but I couldn't seem to find the ON switch.

Thanks

Kelly

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

Re: GLX2 script editor released for Revolution

Post by bogs » Sat May 23, 2020 11:36 am

Well, not that stupid a question at all. It really is click and go, for the most part. When you start it for the first time, the bar under the menu bar is green, like so....
aPic_glx2-notInUse.png
Green...with or without envy...
aPic_glx2-notInUse.png (9.52 KiB) Viewed 17479 times
...If you click on the 'GLX2" end of the bar, that changes the color to ... black, I guess...and enables it to intercept the script editor.
aPic_glx2-InUse.png.png
Use it up..
aPic_glx2-InUse.png.png (9.63 KiB) Viewed 17479 times
It is a really nice attachment, if your using the newer IDEs.
Image

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

Re: GLX2 script editor released for Revolution

Post by mwieder » Sat May 23, 2020 4:37 pm

As bogs said, it's not a stupid question at all.
Can you think of a way to make it easier to grok?
Note also that right-clicking the GLX/2 icon in the status bar will bring up the preferences panel.

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

Re: GLX2 script editor released for Revolution

Post by bogs » Sat May 23, 2020 5:23 pm

mwieder wrote:
Sat May 23, 2020 4:37 pm
Can you think of a way to make it easier to grok?
Keep in mind, I have no idea how you have the bar currently setup to work, BUT, I can think of a couple things that would make it possibly more standardized for new users.
1. make a click anywhere on the bar launch the editor
or
2. convert the wording 'glx2' to a button on that bar, like this -
apic_glx2Button.png
apic_glx2Button.png (2.38 KiB) Viewed 17453 times
Image

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

Re: GLX2 script editor released for Revolution

Post by mwieder » Sat May 23, 2020 6:37 pm

How's this look?
GLX2Button.png
GLX2Button.png (3.84 KiB) Viewed 17445 times

Even better in conjunction with 4WDevolution
GLX2ButtonWith4WDevo.png
GLX2ButtonWith4WDevo.png (4.65 KiB) Viewed 17445 times

...and my favorite is with 4WDevolution minimized for the maximum in saving screen real estate for that Mondrian effect
GLX24WDevoMinimized.png
GLX24WDevoMinimized.png (2.83 KiB) Viewed 17445 times

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

Re: GLX2 script editor released for Revolution

Post by bogs » Sat May 23, 2020 6:51 pm

Yes, I was running it with Devolution myself sometime last week to test something out, very svelte. Problem with asking me how I think it looks, I'm not all that new to it, you really need the eyes and input of someone that knows nothing about it. My problem is, I poke around with everything, even if it looks pretty simple, it isn't a trait I notice many new users doing :?
Image

kdjanz
Posts: 300
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: GLX2 script editor released for Revolution

Post by kdjanz » Sat May 23, 2020 10:10 pm

Thanks - you make me feel better. I had noticed the colour changes and even discovered the right click to set preferences, but because nothing changed when I had a script open in the IDE when the colour changed, it didn't look like anything was happening.

My suggestions:
  • On first run, open the preferences so that the user can see that the plugin has loaded and is active.
  • Add a preference toggle or even a radio button that allows the user to set the default editor to GLX2 or IDE. When the prefs close, the editor window is changed to suit the editor preference chosen.
  • Lastly, add a static graphic that shows what a breadcrumb looks like, where to click to fold, how to outline etc. - in short, the wiki graphics all condensed to one single graphic with overlay notes. Pop this up when the user double clicks on the bar so that they have a cheat sheet when they turn it on. Even add a line of text explaining how to turn it on or off temporarily.
If that bar is just a switch, couldn't it be a lot smaller to save some screen real estate? Maybe about the size of one of the toolbar cells?

Thanks for the hints on usage - I'll go try it out now.

Kelly

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

Re: GLX2 script editor released for Revolution

Post by mwieder » Sat May 23, 2020 10:37 pm

Interesting suggestions. Thanks.
On first run, open the preferences so that the user can see that the plugin has loaded and is active.
I like that one. I could check for the existence of a preferences file, and if one hasn't been set yet I could load the panel. I'll try to implement that one tomorrow.
Add a preference toggle or even a radio button that allows the user to set the default editor to GLX2 or IDE. When the prefs close, the editor window is changed to suit the editor preference chosen.
It's easier than that. Your preference is already saved. If you quit the IDE with the glx2 script editor enabled it comes up enabled the next time you launch the IDE.
Lastly, add a static graphic that shows what a breadcrumb looks like, where to click to fold, how to outline etc. - in short, the wiki graphics all condensed to one single graphic with overlay notes. Pop this up when the user double clicks on the bar so that they have a cheat sheet when they turn it on. Even add a line of text explaining how to turn it on or off temporarily.
This one's gonna require some thought to get into place, but in general, yes... I would like to implement better on-screen help.
If that bar is just a switch, couldn't it be a lot smaller to save some screen real estate? Maybe about the size of one of the toolbar cells?
The status bar does more than that. When you hover the mouse over a control it will show the id of what you're hovering over.

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

Re: GLX2 script editor released for Revolution

Post by bogs » Sat May 23, 2020 10:43 pm

mwieder wrote:
Sat May 23, 2020 10:37 pm
The status bar does more than that.
Heh, understatement of the year maybe. Was in fact the only downside to running it with Devolution, it is so short, you don't see that nice 'long' id pop up :?

...And yes, I know it is as close as putting "put the long id of the mouseControl" into the messagebox :lol:
Image

kdjanz
Posts: 300
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: GLX2 script editor released for Revolution

Post by kdjanz » Sat May 23, 2020 11:48 pm

Add a preference toggle or even a radio button that allows the user to set the default editor to GLX2 or IDE. When the prefs close, the editor window is changed to suit the editor preference chosen.
It's easier than that. Your preference is already saved. If you quit the IDE with the glx2 script editor enabled it comes up enabled the next time you launch the IDE.
I suggested the toggle so that the user is consciously choosing which editor they want - not by accident, but a deliberate choice that then sticks. They also then know where to go to turn it off if they ever want to.

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm
Location: London, England

Re: GLX2 script editor released for Revolution

Post by Bernard » Thu Dec 10, 2020 6:18 pm

I was just looking at GLX2 after a decade away from it.

I wanted to look at using the folders feature to organise a script only stack that's over a thousand lines long. But after adding a return to the script it wouldn't compile (in the chalkboard interface, I could see no error message). At first it looked to me as though script only stacks and GLX2 were not compatible. But given they've been around for years, and given how smart Mark is, that seemed like a very unlikely state of affairs.

I scanned down the script and found a red blob at line 910. Coincidently I launch LC9.6.1 from a shell script, and that terminal window was still open. There I saw one of the infamous LC cryptic error messages in the terminal window. Again, line 910 was implicated

Code: Select all

tried again
explicit=false
268,910,1
114,910,1
341,910,1
166,910,1
165,910,1
Looking around line 910 I found code that made no sense (this was code which had been working for weeks, but clearly wouldn't work as is). Here's what the code should have looked like in GLX2:

Code: Select all

   set the lineDel to tStartHtml
   set the itemDel to tEndHtml
   put item 1 of line 2 of tx into tHtml
   replace "&" with "&" in tHtml
   replace """ with quote in tHtml
   replace ">" with ">" in tHtml
   replace "&lt;" with "<" in tHtml
What had happened in opening this script in GLX2 was that those HTML entities were substituted for the equivalent ASCII characters (e.g. the last line of that script snippet above had become: replace "<" with "<" in tHtml). If this had compiled and saved it would have broken the code. Luckily replace """ with quote in tHtml triggered the compile error.

I assume what happens when GLX2 opens a script it is setting the htmlText of the editor window. And thus any html contained in the script is evaluated.

Just a head's up.

Post Reply

Return to “Announcements”