O'Reilly logo

REALBasic: TDG, 2nd Edition by Matt Neuburg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Shortcuts

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.

To open a window’s Window Editor

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.

To add a control to a Window Editor

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

In a Window Editor, to select the next control

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.

In a Window Editor, while positioning a control, to disable “intelligent” alignment

Hold Command while dragging the control, or position it using the Properties Window.

In the Properties Window, to “set” a string or number value

Hit Return or Enter.

In the Properties Window, to cancel a change to a string or number value

Hit Esc (before hitting Return).

In the Properties Window, to navigate to the next/previous text-editable property

Hit Tab/Shift-Tab.

In the Properties Window, to set a font property to the System font

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

In the Project Window, to remove an item

Select it, then hit Delete. Be careful; whatever code is associated with the item is also deleted.

In the Project Window, to rename an item

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.

In the Project Window, to view an external file

Double-click the item’s listing; or select it, then hit Return; or use the item’s contextual menu.

In the Project Window, to navigate among project components

Use the up and down arrow keys.

To open a Code Editor

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

To toggle between a Window Editor and the corresponding Code Editor

Hit Option-Tab.

In a Code Editor, to navigate quickly to a handler

Control-click to bring up a contextual menu listing the handler.

In a Code Editor, to toggle the focus between browser and code

Hit Shift-Tab. When the browser has focus, up and down arrow keys navigate, and you can hit Delete to remove a property or a handler that wasn’t inserted by REALbasic.

In a Code Editor, to resize the browser

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.

In a Code Editor browser, to expand or collapse a category

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

In a Code Editor, to select a word or a line

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.

In a Code Editor, to append copied material to the clipboard

Hold Shift while copying or cutting.

In a Code Editor, to copy any visible word to the insertion point

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.

In the Language Reference, to alternate between Search and Go

Hold Option.

To accept a proposed “intelligent” typeahead

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.

To change your mind about practically anything

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required