Vous êtes sur la page 1sur 8

tRev Quickstart

Installation
• If you are using GLX2, move file “GLX2 Code.rev” to another folder or delete it.
• Download tRev by clicking the OS X or Vista link (in right-hand column on our site).
• Place the tRev.app (or tRev.exe) at the same level as Revolution.app (or
Revolution.exe). NOT the Revolution shortcut/alias...the application!
• Drag tRev to your Dock or Taskbar
• Click the tRev icon on your Dock or Taskbar
When tRev opens, it automatically launches Rev for you if it isn't already open. If Rev is
already running, tRev doesn't care. He will show you a small portrait of himself in the
upper right corner of your screen, and then you're ready to rock and roar!
The first time you open tRev, it will download the components it needs. Once running, it
will let you know when it needs updating by placing a link in the lower left of the Editor
window that says: Updates Available. Click that link to get your component updates.
You can also use the Help menuʼs Check for Updates... to manually update tRevʼs
components.

Switching
There are six methods you can use to switch between tRev and Revolution:

1. You can click a window in either Rev or tRev to switch back and forth between the
two environments.
2. These are two different apps, but we have them working together as one.
3. Click the tRev logo at the top right of the screen to toggle between Rev and tRev.
NOTE: This operation is not possible on the Vista version of Revolution at this time.
The folks at RunRev are working on solving this problem.
4. Type command+r (Mac) or control+r (Vista) to go from Rev to tRev.
5. Editing the script of any object in Rev will automatically switch you to tRev.
6. There is a Preference (access via Edit menu on Vista or tRev menu on OS X) for
keeping the tRev editor visible at all times. This is a boon to folks with two monitors
and makes switching easier.

Headers, Footers, Tips


In the tRev preferences (and in the View menu) you will see an option for Headers,
Footers, Tips. When this is turned on, youʼll see instructional headers, footers and lots
of helpful tooltips for using tRev. We recommend you take advantage of this feature if
you are new to tRev, or if a new feature has been added and you want to be reminded
of how it works. If youʼre proficient in tRev, turning this off gives you extra vertical space
for coding.
Browsing
When you first open tRev without editing any scripts, you will see tRevʼs Object browser
by default. This is roughly equivalent to Revolutionʼs Application browser. It lets you
explore stacks, cards, groups and controls.
• If an object in the browser has a numeric value to its right, that means it contains that
many actual lines of code.
• If an object is grayed out, it is invisible.
A group can be invisible, but the controls in it may or may not be.
• Any time you want to see the Object browser in tRev, create a new tab via the Tabs
menu or just type command+n (Mac) or control+n (Vista). n=new tab.
• Clicking and dragging a card or control in the browser will change its layer property.
Doing the same with a stack will change its mainstack or substack property.
Depress the option (alt on Vista) key to make a copy of a card, control or stack.
• Selecting an object in the browser and double-clicking it can do several things.

Double-clicking the non-name portion of an object will show the objectʼs code.

Typing enter/return will also open the objectʼs code.

Depressing the shift key while doing this will inspect the objectʼs
properties in Revolution using the Rev property inspector.

Double-clicking the name of an object in the browser lets you edit its name.

When you are done editing the name of an object:

Type return to edit the next line or type command+return (Mac) or control
+return (Vista) or simply type the enter key to accept the edited name.

If the control you are renaming is a new label field, then the name will
become the text content by default. To force this to happen with any field,
hold down option (alt) when typing return to accept the new name.

Clicking outside of the inline name editor or typing escape cancels.

• When an object is selected, you will see Column Buttons become enabled at the
bottom of the objectʼs column. These are Go To, Rename, Visible, Delete or Close
depending upon the type of object.

To bypass the delete dialog, hold down the option (alt) key.

• Column Button quick keys:

g = Go To; r = Rename; v = Visible; d = Delete; c = Close.

No modifier key is needed for a Column Button quick key!


If the Find field has the focus, then, obviously, no quick keys are available.

• The Go To button goes to a stack or card in the toplevel (editable) mode—even if it is


modeless, modal or palette.

If the targeted stack is not visible it becomes visible.

If either the top left or bottom right of the target stack is not within one of your
screen rects, it get re-positioned in the center of your main screen.

If you are going to an object thatʼs not a card or stack, it gets selected with the
pointer tool if itʼs visible and within the rect of the card.

• The Close quick key closes and removes from memory any selected mainstack. If you
have selected a substack, this column button changes to Delete and you can delete it.

If you to save the stack file to which a substack, card or control belongs, select Save
Parent Stack from the File menu or type cmd+s (control+s on Vista).

If you wish to view a snapshot of the current card in the object browser, select Snaps
from the View menu or type cmd+shift+p (control+shift+p on Vista).

Card snapshots are taken any time you click the name of a card in the Cards
column.

Click a Controls column line item, and an orange rect surrounds the control on
the snap—even if it is invisible, disabled or off-screen (but nearby).

Conversely, clicking a snapʼs control will hilite its corresponding line item in the
Controls column. Disabled and invisible controls on the snap can be clicked.

Clicking a snapʼs control cannot in any way modify the actual control.

Inspecting
From Revolution:
• Use any accepted method of editing a script thatʼs native to Revolution. This includes:
• command+shift+s (Mac) or control+shift+s (Vista) for stack scripts
• command+shift+c or control+shift+c for card scripts
• Type command+e (Mac) or control+e (Vista) to edit the object beneath the pointer.
• Type command+d (Mac) or control+d (Vista) to edit the parent of the object beneath
the pointer. d=daddy (as in, whoʼs your daddy?)

From tRev:
• Type command (Mac) or control (Vista) +e to edit the object beneath the pointer.
• Type command (Mac) or control (Vista) +d to edit the parent (d=daddy) of the object
beneath the pointer.
• Depressing the shift key while doing either of those two operations will open the
objectʼs properties in Revolution using its property inspector.
• To perform Transparent Inspection, turn it on via the first item under the Inspect
menu and then move the pointer over any object to identify its name and size without
ever leaving the comfort of tRev.
• The shortcut for Transparent Inspection is CMD or CTL+i.
• The tRev window will become transparent during this operation.
• Press any single key (except escape) to add the object to the tRev collection of
tabs.
• You can turn Transparent Inspection off via the same menu item, by typing the
escape key or by typing CMD or CTL+i.
• CMD or CTL+shift+s and CMD or CTL+shift+c also work in tRev as they do in
Revolution.
• You can also inspect the code or properties of an object from the Object browser as
described above.
• If you type control+space (Mac or Vista), the semi-long name of the Rev object
beneath your pointer will appear in tRevʼs active field. Holding down the option key
while doing this will insert the short name of the object.

Coding
Once tRev editor is editing an objectʼs code, you can write handlers and comments just
as you would in Revolution – but, you have a couple of interesting options:
1. If you have the Auto-completion preference turned on, tRev will try and guess what
handler or variable name youʼre trying to type. It does this by suggesting the
completion of a word while you type.
• To accept a suggestion, type command (Mac) or control (Vista) +k.
• To view the next suggestion it has, type command or control+l (the key next to k on
the keyboard).
• To view the previous suggestion, type command or control+j (the key before k).
2. There are two types of comments in tRev that wield extraordinary power:
• Type --> messages to create a folder in the handler list called “messages.”
• Type /* my.properties + return to insert a special comment block that lets you
create a set of properties of the current object. This is called a “Raptor” handler.
• Type /* basic.properties followed by command or control+k and you will be able
to set the basic properties of the current object.
• Raptor handlers can be edited to suit your needs.
Code Navigation
As you accumulate handlers and call them in your code, you will notice that the text you
use to make these calls become hypertext links. Clicking these links will take you to the
handler they are calling. This is one of tRevʼs handiest features.
• If a link is show in italics, then it is pointing to a handler in another object.
• Handler links are based on handlers found within the current message path, as well as
those in the front scripts, back scripts, parent scripts and libraries that are running.

Handler List
As you write code in the form of handlers, they accumulate in a list to the left of your
code. If you use the folder comments, these handlers will collect into folders. The Sorted
button at the bottom of the Handler List will change the order in which these handler
names appear. When you handlers are being sorted, the Sorted button will appear in
boldface type.
There are a few unique characteristics of the names in the Handler List:
• The first word of any block comment will be given the same status in the Handler List
as a handler.
• Functions and GetProp handlers will be followed by ().
You can double-click any handler or folder name in the handler list to edit and thereby
change its name in the handler list and any reference to it in the current script. Clicking
the Rename button below the Handler list will also let you edit the selected handler or
folder name.

There is also a Delete button below the Handler list. This allows you to delete a handler
from the list and the code field. Deleting a folder will delete the folder as well as all its
handlers. Use with caution, please.

Moreover, you can drag and drop any handler or folder to change its position within the
current script, or—with the optionkey depressed—copy a handler. When Sort is on, you
can move any handler to a different folder or copy any handler within anyfolder. Again,
use of the option key is required for copying.

Tabs
• Close a tab by...
Clicking its Close box
Typing CMD or CTL+w
Depressing the escape key.
Add the option key to close all tabs but the one whose close box you clicked or,
in the case of using a keystroke CMD or CTL+option+w, the active tab alone will
remain open.
NOTE: When one tab remains, closing it switches back to Rev.
• Type CMD or CTL+t for a New tab. CMD or CTL+n also works for this.
By default, a new tab contains the Object browser in the state you last left it.
• Type CMD or CTL+[ to go to the Previous tab (to left of the current tab).
• Type CMD or CTL+] to go to the Next tab (to right of the current).
• Type CMD or CTL+shift+[ to go to the First tab.
• Type CMD or CTL+shift+] to go to the Last tab.

Find & Replace


Under the View menu, you will find a means of showing and hiding the Find/Replace
panel. Thereʼs a nice CMD or CTL+shift+f shortcut for it as well.
There are three things that differentiate the functionality of this component:
1. You can set the case-sensitivity and whole-word options via a pop down menu at the
right of the panel.
2. You can search the current tab or all tabs via the menu in #1 above.
3. You can also use the same pane to search objects in the Object browser or tokens in
the code editor.
The most helpful feature of Find is the ability to select a word and, then, type CMD or
CTL+g to find its next instance. This is a choice under the Edit menu.

Interoperability
Under the Tools menu you will see some menu items that open tools in Revolution.
• CMD or CTL+m will open the Message Box.
• CMD or CTL+shift+m will open the Menu Builder.
• CMD or CTL+shift+a will open the Application browser.
These shortcuts work in Revolution as well as in tRev.

Additional Tools for Coding


There are panes that appear when you need help coding. These are shown and hidden
by clicking on the word Errors, Decoder, Definitions and Stats found along the bottom of
the code field and also accessible via the View menu. Each of these panels, when
visible, have a small close icon at the top left, like the tabs. The escape key will also
close any of these open panes—again, like the tabs.

Errors
This panel automatically opens when you have a compile or execution error. The error
data will be found there, along with a link to the line number where Revolution believes
the error occurred. Most of the time, this line number is correct – but, sometimes it is the
previous line. The errant line of code will be red and hi-lighted, as well. The tab
belonging to the object will also be red.
Breakpoints and the Decoder
To set a tRev breakpoint, open the Decoder panel and select the line where youʼd like
the breakpoint to be set. Then, do one of the following: type return/enter, double-click
the line, or click the Set Break button at the bottom right of the window. To clear a
breakpoint, select it and do the same.
When first set, these breakpoints are lower case followed by pound sign and number.
After the script has run, the word “breakpoint” will be upper case and, when clicked, will
show context data for the code at that point in its execution: the content of handlers,
delimiters, constants, parameters.
Variable data is shown in the Decoder panel with link textstyle.
NOTE.1: If the link has “...” after it, this means not all of the data is being displayed.
Clicking the link will make the data editable, selectable (with command/control+a or
pointer) and subject to copy (via command/control+c).
NOTE.2: if you click on a variableʼs data that does not have “...” after it, that data will
end up in your clipboard.
Definitions
tRev has an extensive 1,500 word dictionary containing definitions of all Revolution
tokens (command, functions, properties, messages, objects, etc).
• After opening this panel, you can click within any token in your code and see its full
definition.
• Right-clicking (or control-click on Mac) any word in your code will automatically open
the Definitions panel and, then, show its definition.

Stats
tRev will analyze your code and show you the actual lines of code you have, how many
lines of comments, the percent of commenting youʼre doing, and several other helpful
metrics.

Staying up-to-date
The application tRev is a standalone that houses the tRev components. tRev app
handles its own component updates. On startup, it tells you when it has a new
component for you and also when the app itself needs updating.
You can also check to see if there are new components or a new build of the app via the
Check for Updates menu item beneath tRev's Help menu.
It also shows you a link, in the bottom left corner of your Editor window, when there's
one or more components for you to update – or if a new version of the tRev app needs
to be downloaded and installed. This link is refreshed when you startup tRev.
If there are new components to install, click Updates Available to retrieve them, and
they will be installed automatically. Some updates require restarting tRev, but most do
not. On the tRev site you will be advised as to whether you need to restart tRev. When
in doubt, restart tRev.

The tRev APP, however, cannot update itself !!


You must do this. tRev will tell you when the app itself needs to be downloaded again
and installed, but you must do the downloading and installing.
How do you update tRev, the application? Just go to the tRev web site and look on the
right side of the page. Click the link to download the Mac or Vista version of the
application. Then, put the app where it belongs and you're ready to fire-up tRev!
Components and new versions of the app are available to current tRev license-holders
only. If your reg code has expired, visit our site to purchase a new one. We have kept
the price of tRev low, therefore the re-licensing fee is the same as the initial licensing
fee. That way we donʼt go broke doing this!

Vous aimerez peut-être aussi