This completes the tour of the REALbasic workspace. What follows is a summary of nonobvious shortcuts for navigating and working in the IDE. Some of them we’ve met earlier in the chapter; others are new.
If you’re in the Project Window, double-click the window’s listing; or select the window’s listing and hit Return; or bring up the contextual menu associated with the window’s listing and choose Edit. If you’re in the window’s Code Editor, hit Option-Tab, or press the first button at the bottom of the Code Editor window.
Drag the control’s icon from the Tools Window into the Project Window, or copy-and-paste or duplicate an existing control. (In Chapter 3, we will learn that there is another way: you can drag a class listing from the Project Window into the Window Editor.)
Hit Tab. This can be particularly useful when controls obscure one another or are otherwise difficult to select; it works even when the control is located beyond the bounds of the Window Editor and is therefore invisible. It is helpful also as a way of changing what object’s properties show up in the Properties Window.
Hold Command while dragging the control, or position it using the Properties Window.
Hit Return or Enter.
Hit Esc (before hitting Return).
Enter the word “System.” The idea here is to give you a
way to specify that the object’s font should be whatever the
System font is on the machine where the application runs; this is
needed because you can’t know in advance what the System font
will be. If you set the font size to
0 it will end
up at the default size for whatever platform the application is built
Select it, then hit Tab. This selects the value of the Name property in the Properties Window, ready for you to type a new name.
Double-click the item’s listing; or select it, then hit Return; or use the item’s contextual menu.
Use the up and down arrow keys.
In the case of a class or module, or of a window when the project is running in the IDE, double-click its listing in the Project Window, or select its listing in the Project Window and hit Return.
In the case of a window when the project is not running in the IDE, select its listing in the Project Window, or bring its Window Editor to the front, and hit Option-Tab. Or, double-click within its Window Editor, or select in the Window Editor and hit Return; this causes the Code Editor to appear showing a handler associated with the particular control that was selected (or with the window, if no control was selected).
Drag the divider bar that separates the two halves. You can drag it all the way to the left to remove the browser completely; the divider bar then appears as a small square in the lower left of the window. You can still navigate among handlers, by using the contextual menu and the history buttons; but unfortunately there’s no way to know what handler you’re actually in, so this mode is largely useless.
Click the category’s triangle; double-click the category; or select and hit Command-right-arrow or Command-left-arrow (starting in REALbasic 3.2, it appears that this works only when the browser has the focus).
Double-click to select a word. Triple-click to select a line. Double-click-drag and triple-click-drag to extend by word or line.
Hold Shift while copying or cutting.
Hold Option and single-click the word. The word to be copied can appear in the code of the same handler, or it can appear on the left side of the window, in the browser, for instance as the name of a property, a control, a method, or an event. The copied word is inserted at the current insertion point or replaces the current selection, without passing through the clipboard. Option-click-drag does not extend the amount of material copied.
Hit Tab. If the proposed completion consist of ellipsis marks, this brings up a list of possible completions; up and down arrow keys navigate, Return or Tab or right arrow accepts, Esc or Delete or left arrow dismisses the list.
Choose Edit → Undo. REALbasic maintains an effectively infinite Undo list, and you can work your way back to an earlier state by choose Undo multiple times (and then, if you change your mind about changing your mind, you can work your way forward again by choosing Redo multiple times).