Scripting in Revolution is a lot more than just typing instructions to the Revolution engine. Most users wonder about some or all of the following: • What is the name of that handler I want to call? There are features in GLX2 that answer each and every one of these questions. NOTE: There is complete documentation on the Script menu in the Menubar docs. • What is the name of that handler I want to call? If you have clairvoyance turned on, you just start typing and the names of suggested handlers just start appearing, along with suggested variable names and Revolution terms like commands, properties and functions. You do however, have to know the first few characters of a handler name to get some matches to appear. • What are its parameters? After using clairvoyance to find the name of that handler, choosing an item from the clairvoyance bubble will aut-complete the call to your handler, complete with it's params. It'll even select the first parameter, if there is one. • What are its parameters? What if you choose not to use some params, but later, in looking at your call to the handler, you wonder what all of the params might look like? Just put the pointer over the link to the handler and you'll see a toooltip with the params in it. • Where is that handler? Is it in the message path? Where exactly? If you see an underlined link in a GLX2 script, it is a call to a handler. If the link is also italicized, then the handler is not in the current script, but in the message path of the current object whose script you are editing. These links allow you to peruse you code and see instantly where calls inside and outside the current script are being invoked in your code. Proper Syntax for Creating Good Links If you want hyperlinks to handlers to work in your scripts do not put spaces between: a function call and the first parenthesis; between "on", "function", etc. and the name of the handler. Examples of supported syntax for creating valid links to handlers: put myFunction (theParam) into theVar -- NOT SUPPORTED SYNTAX on myCommand -- NOT SUPPORTED SYNTAX SYNTAX • What does the code look like? (Answer one.) Shift+Clicking a link will display the handler in the split pane so you can see it code and copy stuff from it by selecting and copying. • What does the code look like? (Answer two.) Clicking a link will take you right to the handler so you can edit it and see exactly where it is, PLUS a bread crumb leading back to where you came from is placed on the crumb bar so you can go back to where you were.
• Why can't I "go back" to where I was a minute ago? In the scenario depicted directly above, you can find your way back to the last few handlers you worked on. A handler name gets put on the crumb bar any time you hyperlink to or from it and anytime you option+click within the script of a handler. Clicking a handler name on the crumb bar will take you right back to that handler with no questions asked. Isn't it fun to say "crumb bar" and "crumbs"? For more on Crumbs, see the Crumb Bar component. • Is there a way to "group" handlers by their functionality without naming them strangely? Scripters throughout history have devised ingenious and compicated ways of grouping their handlers together with comments, handler naming conventions--you'd be surprised. With folders, you may want to look at all that again. You can create a folder anywhere in your scripts by simply putting a comment outside a handler that looks like this: --> mouse handlers This will allow you to group your handlers so you can find them easily, show and hide them in the handler list, and understand them logically as a group of handlers. Like handler links, folders give you an instant mental picture that lets you work faster. NOTE: If a folder name matches the start of a handler name above it, GLX2 gets confused, so for the time being, this is to be avoided. Example of naming to be avoided: • Why can't a script editor "remember" my work in progress, especially my uncompiled scripts? GLX2 respects your right to leave work half done and uncompiled as much as you like by marking any uncompiled scripts (note red colored tab and Compile button) and saving them as compressed developer resources as you work. The next time you open an uncompiled script you have been working on, it will appear as uncompiled (or "dirty"). You can then pick up right where you left off. This is what makes the GLX2 script editor a stateless editor. It also makes it trendously easy to use and helpful at the same time. You never have to answer any dialogs asking whether or not you want to compile an uncompiled script. As stateless editor means never having to say you're sorry. • What happens when my GLX2 scripts has been edited by someone with an older version of Galaxy or Rev? GLX2 "signs" it's object with a small checksum property that identifies the fact that you've used GLX2 on it. It will use that property to see if the script has been changed by another editor and alerts you to this fact. • What do I do if I am editing an object and its tab is not visible? Just like Crumbs, Tabs can scroll to the left and the right. All you need to do is click on any tab and drag left or right. If there are any tabs off-window, they will scroll into view. As you move your pointer left or right, you'll notice that the appropriate tab hilites, also, letting you know what tab would be selected if you released the mouse. NOTE: You can move the pointer above or below the tabs once you start moving it left or right...the scrolling still takes place. NOTE.2: If you edit an object and it has a tab that is off-window, then the tab will scroll into view.Not Just Typing

• What are its parameters?
• What does the code look like?
• Where is that handler? Is it in the message path? Where exactly?
• Why can't I "go back" to where i was a minute ago?
• Is there a way to "group" handlers by their functionality without naming them strangely?
• Why do I have to type so much when it's the same thing over and over?
• Why can't a script editor "remember" my work in progress, especially my uncompiled scripts?
• What happens when my GLX2 scripts has been edited by someone with an older version of Galaxy or Rev?
• What do I do if I am editing an object and its tab is not visible?
Name That Handler

• Why do I have to type so much when it's the same thing over and over?
Params Just Appear

Curious about Params?

Locate That Handler

put myFunction(theParam) into theVar -- SUPPORTED SYNTAX
on myCommand -- SUPPORTED SYNTAX
View That Handler

Edit That Handler

These links allow you to peruse your code and see instantly where calls inside and outside the current script are being invoked in your code.
Finding Your Way

Folders Are Cool


Work-in-progress

Other Editors

Tabs Can Scroll!

