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

ricochet1k
Posts: 39
Joined: Tue Apr 23, 2013 1:30 am

Re: GLX2 script editor released for Revolution

Post by ricochet1k » Sat May 04, 2013 2:25 am

Any idea why with LC 6+ when using GLX2 something causes new stacks to open and then immediately close before they can even render once? GLX2 seems to stop working correctly at that point, with the native script editor mostly taking over even when GLX2 is enabled.

Also, how do you debug it? Do you change all the stack names and stack references to the name without a 'rev' prefix? I'm a bit new to debugging plugins.

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 04, 2013 2:40 am

Wow... that's the third report I've gotten on this. I can't replicate it on linux, OSX, or XP. I'd love to find out what's going on...

Anyway, debugging isn't^H^H^Hshouldn't be a problem. From the IDE's View menu enable "LiveCode UI Elements in lists" and you'll see all the "rev..." stacks in the browser as well. The main stack is "revGLX2 Code".

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 May 06, 2013 8:21 pm

Anyone else having this problem? I absolutely can not replicate it here.

...and for debugging plugins...

Code: Select all

global gRevDevelopment
put true into gRevDevelopment
will allow you to debug system stacks. Remember to set it back to false when you're done - it's there to help keep you out of endless loops.

ricochet1k
Posts: 39
Joined: Tue Apr 23, 2013 1:30 am

Re: GLX2 script editor released for Revolution

Post by ricochet1k » Tue May 07, 2013 1:30 am

Thanks, I'll try to find the source of the problem. I'm not sure how I replicate it, just trying to use it normally for a few minutes triggers it for me.

Something else that might be useful is that sometimes when that happens, the next time the IDE is started GLX2 does not load at all, even though the Plugins folder hasn't changed. It doesn't show up in the Plugins menu either, although the Script Snapshots is listed. Deleting the prefs file brings it back.

Another bug: If you set "Use Chalkboard Motif" before opening GLX2 for the first time, the default text color looks like it is still black. Toggling the setting fixes it.

ricochet1k
Posts: 39
Joined: Tue Apr 23, 2013 1:30 am

Re: GLX2 script editor released for Revolution

Post by ricochet1k » Tue May 07, 2013 2:01 am

Something I'm finding immediately odd is that compiling a script when GLX2 is supposedly enabled is failing because "the cUseGLX2 of stack self" is empty. Line 150 of btn "Compile" throws an error because CurrentObject(...) returns empty.

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 » Tue May 07, 2013 6:01 am

"the cUseGLX2 of stack self" is empty
Thanks - I'm explicitly setting that now. Maybe I wasn't seeing a problem because that property is always non-empty on mine. But I'm not sure how it got out without getting set one way or the other.

And "line 150" is troubling. The line in the Compile button should be line 154. You're looking at build 3.0.14?

GLX2 shouldn't show up in the Plugins menu. That's correct. How are you setting GLX2 properties without opening GLX2? That doesn't sound right.

ricochet1k
Posts: 39
Joined: Tue Apr 23, 2013 1:30 am

Re: GLX2 script editor released for Revolution

Post by ricochet1k » Tue May 07, 2013 6:05 am

If you right click on the GLX2 button on the statusbar the settings stack opens. I found that by accident.

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 » Tue May 07, 2013 6:22 am

Oh yeah... :oops: I forgot I put that in there.
Yeah, the live colorization switch needs a couple of tweaks.

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 » Wed May 08, 2013 2:47 am

Something I'm finding immediately odd is that compiling a script when GLX2 is supposedly enabled is failing because "the cUseGLX2 of stack self" is empty.
Hooray! I managed to replicate this one. Fiddling around with the preferences pane without GLX2 open over and over for a couple of hours I finally got the cUseGLX2 property to save into the preferences file with a value of empty. I'm not sure how - seems like a race condition of some kind because there's only one place in the code that sets that value. But I think I've found a case where a checkbox is neither checked nor unchecked, so its value is still empty at that point. I'm very explicitly forcing it to false now if it's empty before saving the prefs and after loading the prefs. I'll post build 15 in a couple of days before leaving for the conference.

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 3.0.15 released

Post by mwieder » Sat Jul 06, 2013 6:33 pm

Mostly a welcome bug-fix release, but some major and annoying bugs are now quashed.

2013.07.05 GLX2 3.0.15

new
  • The F3 key now acts like command-G as a "Find Again" command
  • Disabled the note-to-handler list as causing problems
(still) known issues
  • The insertion point cursor would disappear on OSX using LC 5.0.2 (only)
  • Double-click to find needs to narrow scope for local vars and parameters
  • Sometimes a script tab has a formatted length of 14 (0+14)
bugs fixed
  • Block comments now colorize properly
  • Settings would open and then immediately close (bad preferences switch)
  • Typing "< " would lose text and reposition the insert cursor
  • Fixed the disappearing conjunctions thing (thanks to Bernd Niggeman)
https://bitbucket.org/mwieder/glx2/downloads

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 » Fri Jul 11, 2014 6:51 am

Urk! I thought I had updated GLX2 a long time ago.
I just posted another update to the website, so glx2 3.0.16 is now available.
My apologies for waiting so long, and feel free to use it as a starting point for more editors, or grab whatever pieces are useful.
Or, of course, just do what I do and use it as your default editor.

https://bitbucket.org/mwieder/glx2/downloads

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.0

Post by mwieder » Mon Apr 06, 2020 5:42 am

hmmm... somehow managed to post before editing.
See below.
Last edited by mwieder on Mon Apr 06, 2020 3:25 pm, edited 1 time in total.

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.0

Post by mwieder » Mon Apr 06, 2020 6:03 am

Whew! It's been a long time since I've updated this.
I really thought I had made my peace with the built-in script editor, but I recently had to look at this thing again and make some long-needed adjustments.
Refactored it so much that it really needs a new major version to reflect all the changes.
So this is the official release of the glx2 script editor 4.0

new features:

Integration of the status bar with Fourth World's devolution
(http://fourthworld.com/products/devolution/index.html)
Refactored code folding
Status bar colors match LiveCode license version colors
Fixed block comment folding inside handlers
Refactored code folding yet again for speed
Renamed stack for ease of editing in Project Browser
Fixed "end try" tab formatting
Removed most dependence on stack naming convention
Some rework for compatibility with Refactor stack
Folding block comments.
Extended pattern matching to "()[]{}"
Line numbers. Yes, finally.
Pressing enter on a compiled script closes the tab ala the built-in editor. I never thought that was a thing.
control-tab and shift-control tab move among the open script editor tabs.
Click in line number field to toggle ghost breakpoints on and off.
Line numbering and ghost breakpoints adjust properly to cut/paste/edit.
There is now a proper license file. GLX2 has always been licensed under the MIT license, but there was no external notice of this, only a custom property (uRIP["EULA"]) of the mainstack.
The "red dot" breakpoints are now functional, with or without PowerDebug. This is a Big Deal, because the dot positions are recalculated when you compile so that the actual breakpoints stay in sync with the visual indicators. To toggle a breakpoint for a given line, right-click on the line and select the option from the pop-up menu. Note that the ghost breakpoints are not persistent, i.e., they only exist for the current session.
NOTE: If you use breakpoints without PowerDebug in the system, you will end up launching the IDE's script editor on hitting a breakpoint. The IDE's debugger is intimately intertwined with the IDE's script editor.

The default font size preference is now 12 point.

bugs fixed:

Ghost breakpoints coexist with code folding.
Compilation errors weren't highlighting the error line properly.
Right-clicking the handler panel was only selecting the folders popup.
Some code folding wasn't working properly. Reformatting could lose code if collapsed.
Removed lots of unused legacy custom properties (see note about deleting prefs file)
Command-w (control-w) closes the current tab.
OSX problem with toggling GLX2 on and off
Ghost breakpoints weren't correctly responding to cut/paste
Refactored for speed
Folding case statements inside switch contructs works properly now.
It was previously collapsing all the way down to the 'end switch' statement.
Line numbering could get out of sync on opening a new tab.
Reopening the script editor after closing wasn't properly noticing previously-open tabs.
Hacked around LC8.1 interaction with reloading/rewriting revTools.
Lots of little things I had time to fix up while waiting.
For one thing, the splitter bar between the handlers and script panels is more accessible now.
The properties were never included in clairvoyance completion
Fixed miscellaneous problems with glx2 plugin handler code
Preferences weren't being loaded properly
Multiple problems solved with handler folders
Several things that were previously working were fixed until they broke, then refactored until they worked again.
The cursor was being positioned improperly for new commands and functions
Two folding structures problems fixed
"else if" was folding in the middle
the combination of folding structures and block comments could lose text
Re-enabled live colorization
Bernd Niggeman contributed live colorization fixes
Fixed the cursor flickering problem
Broke and fixed clairvoyance
Frontscript was interfering with text/icons display in the IDE's dock

known issues:

Line wrapping doesn't change the line numbering. If you turn on line wrapping, the line numbers after a line wraps will be wrong. I don't currently know any way of telling when a line is being wrapped. I'd treat this as experimental and not enable it.
Still some problems recognizing that text inside a block comment is not actionable.
Swapping back and forth between glx2 and the IDE's script editor gets a bit wonky.
Very little testing has been done on any Windows platform. If it works, it works.
Spuriously recognizes "the" as a library handler.

NOTE: the glx2Plugins.txt file should be placed in the same user plugins folder as glx2 itself. If you have an older "glx2 Plugins.txt" file you can get rid of it. I renamed the new file to eliminate the embedded space, and the older naming convention will just be ignored. Current plugin integrations are lcTaskList and PowerDebug.

Also, it's probably best practice to delete any existing "GLX2 Code Prefs.txt" preference file before installing the new version. Some preferences have changed and the discrepancy may cause some confusion.


https://bitbucket.org/mwieder/glx2/downloads/

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 10:15 am

Wow that is a lot!
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 » Mon Apr 06, 2020 3:28 pm

Yeah, well, it appears that it's been some six years now since I sent out an update, so...

Post Reply

Return to “Announcements”