Version 2.0.2 Basics:
• New Icons on Tabs & Status Bar allow more room for tabs & status msgs
• Twice the number of tabs (20 now)
• New Restore Last Session on Startup
• Uncompiled Scripts Palette
• Automatically Hide and Show Rev Tools ala Mac Dock or XP Task Bar
• Beta of built-in Web Browser for Leopard, XP and Vista
Tabbed Browsing - New Icons & Twice the Tabs in 2.0.2!
Have you every used the tabs in your Web browser? It beats the heck out of having a bunch of browser windows floating all over your screen. Same goes for editing scripts in ten separate script windows.
GLX2 now lets you have up to twenty tabs open with the scripts of any twenty objects sitting there, pretty as can be. Just click on a tab and you see a script. The scripts are colorized, full of links to handlers. Quite a sight to behold.
With less windows to manage, there's lot less clicking going on. Some folks may feel like their script editor should be a source of aerobic exercise, but I'm just not one of them, I guess.
There are a few tricks you can do with tabs, too. Shift-click on a tab, and the tab will open as a split pane! Then you can look at two scripts at once. Downright nifty, that one is.
Clairvoyance - Faster & Enhanced in 2.0.1!
Believe it or not, as you type your scripts, GLX2 is trying to guess what you will type next, but doesn't become a nuisance about it, like that Windows 95 paperclip contraption. If you have it turned on as a preference, a clairvoyance "bubble" pops up anytime you type a specified number of characters of a Revolution term (token) or one of your handler names.
Once you're looking at that bubble, just type cmd+k (cntl+k), click on the term in the bubble or use your arrow keys to make your choice. It can all be done without your hands ever leaving your home keys, if you like.
Starting with GLX2 v2.0.1, more quoted strings get added to the clairvoyance list as you type. So now you don't have to type as many of those.
The handler names used in clairvoyance come from the current script, the front scripts, the back scripts, and the entire message path. The tokens come striaght out of the Revolution dictionary. Once you use this feature, there's no turning back. When I type emails now, I expect my email client to finish my words!
There's a lesson on Clairvoyance here somewhere. Check it out and get ready to type less and be able to think more.
Auto-Completion - Faster in 2.0.1!
A bunch of auto-completion takes place with Clairvoyance, but what about control structures and such? It's pretty nice to auto-complete a menupick handler by just typing on menupick and hitting command+k to auto-complete the whole thing with switch/case statements for each item in the menu.
You can even configure the way handlers auto-complete using GLX2's default handlers. There's some stuff here about setting up your own default handlers.
Hyperlinks to Handlers - Faster in 2.0.1!
When I haven't looked at some code for a week or two, I starting forgetting what my handlers were all about. That's when I scan the code in GLX2. Everytime I call a command or function in a script, it stands right out, because it's a bold link. That's not even the best part, though. If the handler I'm calling is in another object, it has a bold, italic link!
Aside from making my scripts more scan-able, these Hyperlinks to other handlers have tooltips attached to them showing me what the parameters are. And, of course, they function as links just like in a Web page. You click 'em and WHAMMO, you're looking at your handler. If it's in another object, then you're also in a new tab. Hold down the shift key, click, and you're looking at your handler in a split pane so you can copy code, review it...whatever you like. Real slick-like.
There's another kind of link that doesn't show itself like a traditional hypertext link in GLX2 scripts—otherwise it'd make the code pretty much indecipherable and hard to edit—and that's links to Revolution terms. If you want to know what a term you're using in a script means, just right-click on it (control-click it if you got you one of them one button mice or a Mac laptop) and you'll hyperlink to the Revolution dictionary definition of the term.
With these links in my scripts, I can warm up even the coldest code in minutes—even if someone else wrote it!
Bread Crumbs - Faster & Enhanced in 2.0.1!
You know how they got that extra-terrestrial to follow them in that ET movie? They left a trail of M&M candies for him to follow? Well, GLX2 treats you like ET when you click only those links in a handler I was talking about. It leaves the handler name as a "bread crumb" up on the crumb bar, so's you can get back real quick-like to the the handlers you're working on.
You can also force a bread crumb onto the crumb bar by option-clicking anywheres in a handler.
Starting with GLX2 v2.0.1, there is a preference to add crumbs more often. With this option checked, any typing or text selection in a handler also adds that handler's name to the crumb bar.
I found a whole section in the docs on bread crumbs here.
No-Click Inspection - Faster & Enhanced in 2.0.1!
You'd think if you were designing an integrated development environment, you'd make super easy to edit the script of an object, right? I hate to say it, but before I had GLX2, I'd have to go through all sorts of contortions to get a script open. And most of the time I'd have to be in the "pointer" mode. And palettes were out of bounds.
In my ideal set-up, I'd just LOOK at an object and the editor would pop up with the script. Well, GLX2 doesn't do that for me—at least not yet—but what it does do is a big step forward. When I put my little old mouse over an object and hold down the command and option keys (I use control and alt on my Windows box), up pops the GLX2 script editor. It does something else pretty splendid, too. In fact that's my next topic.
Starting with GLX2 v2.0.1, there's now an optional status bar that attaches itself to the Revolution Dock and tells you what object is sitting beneath your mouse pointer.
Work-in-Progress - More Save Options in 2.0.2!
GLX2 was put together by a guy who does a lot of work for clients. And you know how clients are? They're always asking for changes and new features. Anyways, this fellow figured it didn't pay to ever assume any code was ever "done" or that there was a final version of anything. So he designed GLX2 to be "stateless" and assumed all work was "work-in-progress."
At first I thought it was a pretty complicated notion, but it just means "it ain't done!" When you open the script of an object you've worked on before, it appears exactly the way you left it. Same scroll position, same handler folders open, same text selection or insertion point. If you haven't compiled it yet, the tab name and the compile button are yellow, so's you know it's a "dirty" script—meaning, it hasn't been compiled since you changed it.
GLX2 won't ever stop you from closing a stack, a tab or it's editor. Nope. It assumes all work is work-in-progress and it ain't done. Truth be told, it never will be. Phew. This is getting a might existential. Let's talk about something else.
Handler Folders Created from Comments
I just mentioned these, so I'd best explain. I know folks who go through all sorts of fancy commenting in scripts to organize their handlers. Then name them a certain way so they sort right in the handler list. Or they write these big block comments like it's the introduction to a Star Wars movie.
In GLX2, you just put a comment like this "-->" to create a folder in your script and the text following it becomes a folder name in the handler list. The handler list then works like a tree, hiding and showing the stuff you need to see or don't need to see.
Now managing to open and close folders could become a chore, but that ain't so with GLX2. Whenever you select any text in a handler's script, the handler in question automagically selects itself in the handler list. That ain't the half of it: if the handler's tucked away in a closed folder, the folder opens. And that means less clicking around, partner. Something to think about.
That reminds me: I even put my global, local and constant declarations in a folder. That way I can get to them any time I want by way of the handler list. Mighty nice feature, those folders.
Starting with GLX2 v2.0.1, handler names in the handler list have their own icons. Public handlers have a paper scroll icon, private handlers have a lock icon, block comments have a note icon, and property-oriented handlers have a check list icon.
Comments in scripts that become handler folder names can also be bolded in the script so you can find them quicker. That's a new preference.
You can study up more on handler folders here.
Block Comments Treated Like Handlers
Do you like to make block comments with "/*" and such? You might give it a spin. I like to write a little prose below each of my handler folders describing what's in the folder and the reasoning behind the collection of handlers contained therein.
Well, if you do like that and write a block comment, the top line of the comment will become just like a handler name in the handler list. That way you—or the folks working with you—get to your inline documentation in two shakes. Quick-like.
Starting with GLX2 v2.0.1, you might also notice that the "body" of your block comments are styled like your other comments with comment colors and italicization, assuming you have those preferences turned on.
In What Folder Did I Put That Handler?
I'm two steps ahead of you, here, bubba. If you know the name of a handler—or at least the beginning of it—you can find it in the Handlers menu on the GLX2 main menu (called a "menu bar" on the Mac). That menu's alphabetically sorted, too, making the task at hand easy-like.
Find & Replace: No Big Deal, but Find Again, Is!
GLX2's find and replace stuff is pretty standard. It does some tricks with switching to case sensitive if you hold the option key down, but truth told, I don't mess with that all too much. What I like to do is not type anything in the find field at all. I just select a string in the script and hit command+g to find the next instance of the selected string.
Let's face the facts, here, fellow babies, there's a very limited number of unique words that you type into a script editor. And I tend to use similar variable names, like most everybody. So 90% of the time I just use the old Find Again trick with the keyboard shortcut and I do less typing. Less typing is good.
Here's more about Find and Replace.
You a Declare-All-Handlers Type?
There's a cult of these people somewhere—I think it's France. Anyways...you can force all your compiles in GLX2 to demand this particular convention, but that's no big deal.
Here's the good part: you can make these variable declarations to occur en masse (thought I'd use a little French, there) with a single menu command (or short-cut key: cmd+d). You can do the entire script this-a-way, or you can do it just for the handler you're working in.
Let's Talk about Bugs
Someone's got to talk about these rascals. I was surprised to find that a lot of Revolution folks don't even use the debugger. I admit, some scripts, because of their nature, don't debug easy. Some code is interlocked with system events so it can't execute with a debugger running. GLX2 has a little trick it does in these cases.
I'm referring to Script Snaphot. You turn this fellow on via the Script menu, just like the debugger. Then, you type "breakpoint" wherever in the script you want to take a snapshot of the variables and such of your choice. You can also just type command+b to get a breakpoint. To configure the Script Snapshot "camera", just choose Script Snapshot from the GLX2 Tools menu.
Trevor DeVore wrote a bunch about the Script Snapshot tool, since he invented it.
GLX2 has a pretty nice debugger, too, thanks to a lot of Trevor's doing. You have to insert the command "breakpoint" in order to get it to come up, though. Using this method, GLX2's editor runs cleaner and types faster—since it doesn't have to manage its breakpoints in a separate list and adjust them every time you type a return in the script field.
People say "Hey, using breakpoints as text means more typing!" Yeah, but you can use command+b, and then there's less clicking. When you code, your hands are on the keyboard, aren't they now?
Really Find Out More
If you've got a few minutes you might check out some key sections of the documentation for GLX2. I recommend preferences, menu bar and scripts because they cover a lot of ground.
GLX2 is a dead-simple product to use, but it has depth you don't really discover until you use it.
It's Time to 'Fish or Cut Bait', Amigo
Tired of all that clicking and typing and wasting your brain on unnecessary messing around? You could end a lot that here and now. Feel free to buy it now.
Check it out; peace out, amigos.