- Creating Behavior Without Programming
- Using the Code Editor to Write REALbasic Code
- Getting Help with the REALbasic Language
- Mastering Dim and Assignment Statements
- Making Tests and Comparisons
- Writing Code that Branches
- Writing Code that Repeats
- Writing Your Own Methods
- Extending the HTML Editor
- Creating the Indent Menu Item
- Removing Existing Indentation
- Inserting Indentation Before Tags
- Handling the Indent Level
- Extending the Project
Getting Help with the REALbasic Language
This chapter covers the rudiments of the syntax and vocabulary of REALbasic. But I don't address many instructions and features here. You can find documentation on nearly all of them in the Online Language Reference, but you have to know where to look.
To access the online language reference:
Choose Help > Language Reference (Figure 4.16).
Figure 4.16 The Online Language Reference is a searchable, browsable database of documentation on REALbasic syntax.
or
Press Command-1.
or
Press the Help key, if your keyboard has one.
To browse the online language reference alphabetically:
Click the Alpha button (Figure 4.17).
Figure 4.17 When you're browsing the Online Language Reference, click the Alpha button to see all entries in alphabetical order.
Scroll the left pane (the browser) to find the item.
Select the item in the left pane to view its documentation in the right pane.
To browse the online language reference by theme:
Click the Theme button.
Scroll the left pane (the browser) to find the item.
Select the item in the left pane to view its documentation in the right pane.
Tip
Any text that appears in blue underlined format in the Online Language Reference is a link. Click it to view its documentation (Figure 4.18).
Figure 4.18 The Online Language Reference documentation contains hyperlinks to other parts of the documentation.
To view the documentation for a particular control in the Online Language Reference:
Select the control in a window.
Open the Online Language Reference. The documentation for the control will appear.
To search the online language reference for a particular term:
Type the term in the text box at the top of the window (Figure 4.19).
Figure 4.19 Searching the Online Language Reference.
You can search for only a single word. No spaces can appear in your entry. As you type each character, REALbasic tries to guess what you may be looking for. To accept its guess, press Tab.
If you see three dots, press Tab to get a list of choices.
Click Search, or press Return.
Choose the item in the browser pane.
To cancel a search:
Click Home.
This action will cancel the search and return the browser to its normal state.
The Online Language Reference includes code examples in its documentation. You are free to include these code snippets directly in your programs, and the Online Language Reference makes it easy to do just that.
To use code examples from the online language reference in your own programs:
Drag the gray rectangle surrounding the code example to the place where you want to insert it in your code (Figure 4.20).
Figure 4.20 You can copy code examples from the Online Language Reference to your own programs.
or
Click the point in your code where you want to insert the code; then Option-click the code in the Online Language Reference.