
Beginning REALbasic - From Novice To Professional (2006)
.pdf358■I N D E X
audio (continued) sound effects, 301
speak method, 301, 304–305 AutoEnable property, 126
■B
Back button, Windows Editor toolbar, 98 BackColor property, 310
BackDrop property, 313
Backward button, Windows Editor toolbar, 98 Backward menu, Main toolbar, 38
BASIC programming language, 3–4 bbBold PushButton control, 271 bbFontSize control, 270
beep method (sound effect), 301–302 BevelButton control, 79, 260, 268–272 bitmap file, 232
blnExitApp variables, 165 Bold property, 27
book database application, 292 Bookmarks menu, 37
Boolean constants, 171 Boolean expression, 198 Boolean value, 140, 228 Break keyword, 330 breakpoints, 329–330 Browse button, 283 Browser pane, 220 Browser windows, 219 bugs, 323
Build icon, 32
Build menu, Main toolbar, 38 Build Process icon, 325–326 Build Settings option, 32 built-in constants, 151
built-in database support, REALbasic 2006 standard edition, 11
built-in source code, 211
■C
calculator application, 154, 156–161 Cancel button, Open dialog window, 251 CancelButton, MessageDialog, 217 CancelButton, MessageDialogButton, 217 CancelButtonCaption property, 248
Canvas control, 80, 84, 301, 310, 313, 317, 349 cAppName constant, 153
Caption property, 28, 62, 140–142, 269 Case Else statement, 170
Case statement, 169
Catch blocks, 337
CDbl data type conversion, 145
CDbl function, 145
changing properties, 61 CheckBox control, 78, 80, 320 Checked property, 204, 206
Child method, FolderItem class, 246 Clear button, 158
Clear method, 151
Clone method, Sound class, 302
CloseButton control, 100
CMY color model, 312 code blocks, 143, 164–165
Code Editor, 11, 29–30, 42, 49, 101, 136, 157, 181, 203, 219–220, 226, 235, 293, 327
Code Editor pane, 330
Code Editor toolbar, 220
Code view, 131
Color Picker window, 310
Column List field, 286
Column method, DatabaseRecord class, 283 ColumnCount property, 289
ComboBox control, 81, 191, 199 Comment Command button, 136 comments, 135–136, 138
Commit method, Database class, 283 common prefix characters, 143

Common UNIX Printing System (CUPS), 10 comparison operators, 173
compiling applications, 4, 32–33 conditional logic, 163, 348
#If … #EndIf block, 171–172
If … Then … Else block, 166, 168 If … Then … ElseIf block, 168–169 If … Then statement, 164–165 multiple line If … Then blocks, 165 OS specific conditions, 171–172 overview, 163–164
Select … Case block, 169, 171 single line If … Then statement, 165 types of conditional statements, 163
Config.txt, 246
Connect method, REALSQLDatabase class, 277
console application, 13, 44, 292 CONST keyword, 152
Const statement, 152 Constant Name field, 235 constants, 138, 153
locally defined, 152 modules, 224 windows, 226, 233, 235
Container control, 80
contextual menu, Code Editor, 198 ContextualMenu control, 81 control objects, 209
control subclasses, 212
controlling statement execution, 332 controls, 23
adding, 78, 95 alignment, 96–97 BevelButton, 79 built-in, 47 Canvas, 80 CheckBox, 80
ComboBox, 81
Container, 80 ContextualMenu, 81 DatabaseQuery, 81 DataControl, 82 deleting, 79 DisclosureTriangle, 82 EditField, 82 ExcelApplication, 83 Favorite controls, 47 GroupBox, 83 HTMLViewer, 84 ImageWell, 84
Line, 85
ListBox, 85
lost controls, 78 MoviePlayer, 86 NotePlayer, 86 OLEContainer, 86 Oval, 87 PagePanel, 87 Placard, 88
Plug-in controls, 47 PopupArrow, 88 PopupMenu, 88 PowerPointApplication, 89 ProgressBar, 89 ProgressWheel, 89
Project controls, 47 properties, 78 PushButton, 90 RadioButton, 90 Rb3Dspace, 90 RbScript, 90 Rectangle, 90 RoundRectangle, 91 ScrollBar, 91 Separator, 91
■I N D E X 359
com.apress.http://superindex at faster it Find
360■I N D E X
controls (continued)
Serial, 92 ServerSocket, 92 Slider, 92 SpotlightQuery, 92 SpriteSurface, 92
StandardToolbarItem, 93 StaticText, 93
tab order, 97 TabPanel, 93 TabSocket, 93 Thread, 94 Timer, 94, 99 ToolbarItem, 94 UDPSocket, 94
UpDownArrows, 94 WordApplication, 94
Controls pane, 47, 77
Conversion Utility for Visual Basic projects, 349–350
coordinate system, graphics, 310 Count property, 150, 247 Counter variable, 193
CreateDatabaseFile method, 276, 281–283 CreateTextFile method, 252 cross-platform remote debugging, 13 cryptic errors, 333
CStr data type conversion, 145 CStr function, 145 cTitlebarMsg constant, 263
CUPS (Common UNIX Printing System), 10 custom control classes, 212, 215
custom project templates, 44
custom properties and methods, 339, 341 Customize Main Toolbar dialog, 38–39
■D
data, 138
arrays, 146–149 constants, 151–153
data type conversion, 144 dictionaries, 149–150
key-value pairs (dictionaries), 149–150 REALbasic data types, 139–140
scope of variables, 144
storing and retrieving overview, 138 string manipulation, 145–146 variables, 142
data type conversion, 144 data types, 139–140, 348
Database Editor, 283, 285, 287–288
Database property, REALSQLDatabase class, 277, 291
DatabaseFile property, REALSQLDatabase class, 276
DatabaseQuery control, 81, 289–291 DatabaseRecord class, 283 databases
Add Database (REALbasic IDE), 275
adding tables, columns and indexes (REALbasic IDE), 278–279
changing data (IDE), 288 Connect method, 277
connecting to a database (REALbasic IDE), 276
CreateDatabaseFile method, 276, 281–283 creating REAL SQL databases, 275 Database Editor, 283, 285, 287–288 DatabaseQuery control, 289–290 DataControl control, 291–292
defined, 273
front-end programs, 289 indexes, 280–281
opening REAL SQL databases, 275 plug-ins, 274
queries, 283, 285, 287 schemas, 277
SELECT keyword, 287–288
SQLExecute method, 281–283

Structured Query Language (SQL), 274,
287–288
DataControl control, 82, 289, 291–292 DataField property, 291–292, 350 DataSource property, 291–292, 350 DataType keyword, 193–194
Date class, 215
DebugBuild constant, 151, 171 DebugBuild OS specific condition, 171 debugger operation, 328
debugger toolbar, 333 debugging, 8
breakpoints, 329
controlling statement execution, 332 debugger operation, 328
error categories, 323
error handler code, 333–337 error prevention, 324 exception blocks, 334–337 listing syntax errors, 326 logical errors, 328
run-time errors, 327–328, 334 Stack list, 330
stepping program execution, 333 syntax errors, 324–325
toolbar, 333
tracking values, 330, 332 trapping errors, 333–337 Try - Catch blocks, 337 Variables pane, 330, 332 DecimalButton control, 158
Decrypt window, 77 default window, 47, 75
Delete method, FolderItem class, 250 deleting
files or folders, 250 windows, 76
deleting controls, 79 demo application, 293
■I N D E X 361
demo REALbasic version, 12 |
|
|
design conventions, menus, 122 |
|
|
desktop calculator, 154 |
|
|
desktop clock application, 98–101 |
|
|
development platform, 8 |
|
|
dictionaries, 138, 149–150 |
|
|
Dim keyword, 147, 150 |
|
|
Dim statement, 142–143 |
|
|
dimensions, 147 |
|
|
dimensions of arrays, 147 |
|
|
disabling menu items, 126 |
|
|
DisclosureTriangle control, 82 |
|
|
Display Name, 245 |
itFind |
|
DLL "hell" and REALbasic, 15 |
||
DisplayMsg subroutine, 229 |
faster |
|
Do … Loop, 188–189 |
||
|
||
Do … Until Loop, 189–191 |
at |
|
Document window, 69, 87 |
||
com.apress.http://superindex |
||
documentation, 52–53, 56 |
||
|
||
Do ... Loop loop, 188 |
|
|
dot notation, 140 |
|
|
downloading REALbasic, 13 |
|
|
DownTo keyword, 194 |
|
|
DrawBlock method, 258, 266–267 |
|
|
Drawer Window, 75 |
|
|
DrawLine method, 316 |
|
|
DrawStopIcon method, 315 |
|
|
DrawString method, 257–258, 314–315 |
|
|
dynamic arrays, 148–149 |
|
|
■E |
|
|
edfTextArea control, 265, 270 |
|
|
Edit Bookmarks dialog, 40 |
|
|
Edit menu, 37, 107–108, 179, 233 |
|
|
Edit Value window, 27 |
|
|
EditField control, 24, 27, 60, 63, 81–82, 99, |
|
|
130, 143, 158, 177, 183, 185, 192, 196, |
|
|
252, 258, 260, 269–270, 287, 296, |
|
|
298–299 |
|
|
Editor Only menu item, 42 |
|
362■I N D E X
Editor toolbar, 42, 45 editors, 42
Element variable, 195 elements, 146
Else statement, 166 embedding comments, 135
EnableMenuItems event handler, edfTextArea control, 265
Encrypt window dialog, 76
encrypting and decrypting windows, 76–77 endless loops, 199
EndOfLine class, 215 EndOfLine object, 193, 216
enhanced database support, REALbasic 2006 professional edition, 12
equals (=) operator, 173 error categories, 323
error handler code, 333–337 ErrorParameter parameter, 334 ErrorType parameter, 334 event code, 62–63
event handlers, 219–220 Event Handlers entry, 293 event programming, 29–30
event-driven programming, 218–220 events, 50
ExcelApplication control, 83 exception blocks, 334–337 execution platform, 8, 10 Exists method, 249
Exit option, 119 Exit statement, 189
Explanation, MessageDialog, 217 Export option, 212
exporting control classes, 212
extensibility, REALbasic 2006 standard edition, 12
extension file identifier, 244–245 Extensions property, 204, 245
■F
file and folder processing Child method, 246 Count property, 247
deleting files or folders, 250 FolderItems, 245 GetOpenFolderItem, 245, 247–248 location, 246
OpenDialog class, 247–248 overview, 243
special folders, 247
verifying file or folder existence, 249 File menu, 37, 107, 262
file system access, 348 file type, 243
File Type Set, 244–245, 262
File Type Set Editor, 245, 262
FileClear menu, 131
FileOpen menu, 204
FileOpen menu handler, 264
FileOpen menu item, 237
FileOpenMP3File menu item, 320 FilePlay menu, 205
FilePrint menu handler, 266
FileQuit menu handler, 267
FileQuit menu item, 131
FileSave menu handler, 264
FileStop menu item, 206
FileType class, 204
FillRect method, Graphics class, 316 Filter property, 248
Floating Window, 70 focus, controls, 97
FolderItem class, 205, 247, 252, 303, 310 FolderItem objects, 276
FolderItem reference, 246, 250 FolderItems, 245
folders. See file and folder processing font changes, styled text, 252–253

Font section, 27
For … Each loop, 188, 195, 197 For … Next loop, 148, 188, 193–195
ForeColor property, Graphics class, 314 Forward button, Windows Editor toolbar, 98 Forward menu, Main toolbar, 38
Frame property, 68, 225
Front button, Windows Editor toolbar, 98 front-end database programs, 289 functions, 227–228, 348
■G
GetFolderItem method, 246, 277, 303 GetNetworkInfo method, 340–341 GetNetworkInterface method, 338
GetOpenFolderItem function, 205, 245, 247–248, 251, 264, 304
GetRandomNumber function, 230 GetSaveFolderItem function, 254–255, 264 global bookmark, 39
Global Floating Window, 73
Global level, 222
global module scope, 222 graphic file types supported, 231
graphical integrated development environment (IDE), 4
graphics
Canvas control, 313 CMY color model, 312 coordinate system, 310 Graphics class, 313–316 HSV color model, 312 icons, 314–315
lines, drawing, 315 Paint event, 313 Pixel property, 313 RGB color model, 312 shapes, drawing, 316
Windows backgrounds, 310, 313 Graphics class, 301, 310, 313–316
■I N D E X 363
Graphics object, 256–258
GroupBox control, 83, 90, 166–167, 177
GUI programming, 22–23
■H
hardware requirements
Linux, 10 |
|
|
Macintosh, 8 |
|
|
Windows, 9 |
|
|
HasBackColor property, 310 |
|
|
Hello World first application, 19–20, 23, 26 |
|
|
Help menu, 37, 52–53, 56, 157 |
|
|
help system, REALbasic 2006 standard |
|
|
edition, 11 |
itFind |
|
HelpAbout menu item, 132, 206 |
||
|
||
HelpOnlineSupport menu item, 237 |
faster |
|
higher-level scope, 180 |
||
|
||
History menu, 37 |
at |
|
|
||
horizontal alignment indicators, 96–97 |
com.apress.http://superindex |
|
|
||
HSV color model, 312 |
|
|
HTMLViewer component, 57–59, 61–64 |
|
|
HTMLViewer control, 59, 84 |
|
|
HTMLViewer1 control, 62 |
|
■I
icon file association, 245 Icon property, 177, 201
icons, drawing with Graphics class, 314–315
IDE (Integrated Development Environment), 4–5, 7, 20, 35–36, 67, 103, 273, 325
If … Then … Else block, 166, 168, 276
If … Then … ElseIf block, 168–169
If … Then statement, 164–165 ImageWell control, 84, 232 importing
control classes, 212 Visual Basic projects, 349
indexes, 147, 280–281 infinite loops, 199 InitialDirectory property, 248
InRange method, Random class, 182
364■I N D E X
Insert method, arrays, 149 instance, controls, 24 instantiation, 209
InStr string manipulation function, 145 Instrument property, 306
intCounter variable, 188, 190, 197, 199
IntegerColumn method, DatabaseRecord class, 283
integers, 140
Integrated Development Environment (IDE), 5, 7, 20, 35–36, 67, 103, 273, 325
Intel Macintosh, 9
Interface Assistant displays, 96 interface scrolling, 94 InterfaceID property, 340 internet development features
REALbasic 2006 professional edition, 12 REALbasic 2006 standard edition, 11
Interrupt parameter, 304 intResult variable, 159
intSecretNumber property, 182, 185 IsPlaying method, Sound class, 302 iterative processing overview, 187–188
■K
Key property, 120–121 keyboard equivalents, 118 keywords, 348
■L
language reference, 54 lbxInterfaceIDs ListBox control, 341 Left property, 248
Len string manipulation function, 145
Line control, 85, 261
Line Separator bars, 262 line-by-line control, 330
lines, drawing with Graphics class, 315–316 Linux, 10
hardware requirements, 10 OS compatibility, 10
user interface design, 68 ListBox control, 85, 212, 289 listing syntax errors, 326 Load caption, 63
LoadURL method, 62 local bookmark, 39 Location area, 56
Location menu, Main toolbar, 38 log file, 163
logical errors, 328
logical operators, 169, 175 LongTime property, Data object, 101 loops, 148, 348
For … Each loop, 195, 197
For … Next loop, 193–195
Do … Loop, 188–189
Do … Until Loop, 189–191 endless, 199
overview, 187–188
shortcuts for creating, 197–198 While … Wend loop, 192–193
lost controls, 78
Lowercase string manipulation function, 145 Ltrim string manipulation function, 145
■M
MacControlKey property, 121 MacCreator file type, 245 Macintosh, 10
applications, 119 hardware requirements, 8 user interface design, 68
Macintosh Classic, 128 Macintosh menu customizing, 128 Macintosh-only modifier keys, 121 MacOptionKey property, 121 MacType, 245
MacType file type, 245 main toolbar
Add Bookmark, 38

Backward, 38
Build, 38
configuration, 38–39 Forward, 38 Location, 38
Run, 38
Search, 38
Mandatory key, 279 mathematical operators, 173–174 MaximizeButton, 61 MediaPlayer, Windows, 86, 203 Menu Editor, 42, 47, 49, 103, 117 Menu Event Handler button, 131 menu handlers, 124, 220, 233 menu headings, 122
menu items, 103, 105 menu system, 103, 179 MenuBar control, 99
MenuBar Editor, 130–131, 157, 179, 202, 233 MenuBar items, 104
MenuBar1 item, 22 MenuHandlerName placeholder, 126
MenuItem Name drop-down list, 204, 237 MenuItem Name field, 132, 157, 263 MenuModifier property, 120–121
menus, 105
accelerator keys, 118, 121, 123 adding a new menu bar, 108–109
Apple and Macintosh menu customizing, 128
autoenable, 126 Bookmarks menu, 37
converting menu items to menus, 127 disabling menu items, 126
Edit menu, 37
example word processor application, 263–268
File menu, 37
Help menu, 37
History menu, 37
■I N D E X 365
keyboard equivalents, 118 |
|
|
menu components, 105–106 |
|
|
menu items, 112, 114 |
|
|
Menubar default, 106–107 |
|
|
overview, 103–104 |
|
|
previewing menus, 117 |
|
|
Project menu, 37 |
|
|
reconfiguring menu organization, |
|
|
126–127 |
|
|
removing menu and menu items, 128 |
|
|
separator bars, 119 |
|
|
shortcuts, 118, 120–121 |
|
|
submenus, 37, 109, 112, 115–116 |
Find |
|
triggering commands, 123, 125 |
||
|
||
View menu, 37 |
it |
|
|
||
Window menu, 37 |
faster |
|
Message, MessageDialog, 217 |
||
MessageDialog class, 76, 216–218, 231, 263, |
at |
|
com.apress.http://superindex |
||
267–268 |
||
|
||
MessageDialog object, 217 |
|
|
MessageDialogButton class, 217 |
|
|
Metal window, 74 |
|
|
Method Name field, 235 |
|
|
methods |
|
|
modules, 222–223 |
|
|
parameters, 227–228 |
|
|
windows, 226, 228, 230, 235 |
|
|
Microsoft ActiveX controls, 95–96 |
|
|
Microsoft Office, 83, 89, 94 |
|
|
Mid function, 145 |
|
|
Mid string manipulation function, 145 |
|
|
MIDI, 305 |
|
|
migrating from Visual Basic |
|
|
Conversion Utility, 349–350 |
|
|
differences, 348–349 |
|
|
importing Visual Basic projects, 349 |
|
|
overview, 347 |
|
|
preparation, 349 |
|
|
Mile, 95 |
|
|
MinimizeButton control, 100 |
|
366■I N D E X
Modal Window, 70 module scope, 222 modules, 220–222
Monkeybread plug-in controls, 95 Mouse Move drag event, 184 MouseMove event handler, 228 Movable Modal Window, 69–70
movie player application, 200, 202–204, 206–207
MoviePlayer control, 86, 200–201, 205, 301 Mozilla browser, 58
MP3 Player application, 317, 319–321 MPEG video files, 200, 202–204, 206–207 MsgBox function, 76, 133, 157, 165, 197, 216 multidimensional arrays, 147
multiline input, 82
Multiline property, EditField control, 253, 304
multiplatform application creation, REALbasic 2006 professional edition, 12
multiple line If … Then blocks, 165 multiple operating systems (OSs), 117 MyTestDB database, 291
■N
Name property, 156, 204, 221, 225 Network Connection Checker, 338
network connection checker application, 338–343
NetworkInterface object, 338–339
NetworkInterfaceCount property, 338
New keyword, 150, 182
New Project dialog, 43
NewChanges property, 265
NextPage method, Graphic class, 257
Not operator, 175
NotePlayer class, 307
NotePlayer control, 86, 301, 305–309 notes, 136
null array, 148
number guessing application, 176, 178–179, 181, 183–184, 186
numeric data types, 140
■O
object binding, 289 Object class, 210 ObjectName, 140
object-oriented programming (OOP), 6, 209 advantages, 210
classes, 209, 215–216 control objects, 209, 211–212 events, 218–220
instantiation, 209, 211, 215–216 menu handlers, 220, 233 modules, 220–222
noncontrol classes, 209–210 overview, 209
REALbasic 2006 standard edition, 11 windows, 225–226
OLEContainer control, 86
Online Support web page, 234
OOP. See object-oriented programming Open dialog, 177, 205
Open dialog window, 245, 247–248, 264 Open event, 181, 203
Open event handler, 237, 269–270, 313, 335 Open file dialog window, 245
Open menu item, 218
Open subroutine, 227
OpenAsSound method, 303
OpenAsTextFile method, 251 OpenDialog class, 247–248, 254 OpenImage method, 236 OpenPrinter function, 258 OpenPrinterDialog function, 256, 267 OpenStyledEditField method, 253, 264
OpenStyledEditField method, FolderItem class, 253
operator precedence, 174

operators, 348 Optional keyword, 231
Options menu item, 325–326 Options window, 325 OptionsMediaPlayer menu item, 206
OptionsQuickTime menu item, 204, 206 Or operator, 175
OS compatibility, Linux, 10
OS specific conditions, 171–172 OutOfBoundsException error, 336, 341 OutOfMemoryException run-time error, 327 Oval control, 87
■P
Page Setup dialog, 255–258, 267 Page Setup settings, 263 PagePanel control, 87
Paint event, 313
Pan method, Sound class, 302 parameter line, 227 parameters
default values, 230 methods, 227–228 Parameters field, 230
Parent property, FolderItem class, 246 Pause button, Debugger toolbar, 333 pbnAdd PushButton, 299
pbnMute control, 320 pbnPlay control, 320 pbnStop control, 320 PCAltKey property, 121
PersonalBookDB database, 292
PersonalBookDB item, 299
picture viewer application, 231, 233–238 pitch integer, 307
pixel, 85
Pixel property, 313
Placard control, 88
Plain Box Window, 71
■I N D E X 367
platform-specific application creation,
REALbasic 2006 standard edition, 12 |
|
|
Play method |
|
|
MoviePlayer control, 206 |
|
|
Sound class, 302–303, 320 |
|
|
PlayerType property, MoviePlayer control, 206 |
|
|
PlayLooping method, Sound class, 302, 320 |
|
|
PlayNote method, 307 |
|
|
plug-ins, 95, 274 |
|
|
plus (+) button, 287 |
|
|
plus (+) character, 158 |
|
|
PopupArrow control, 88 |
|
|
PopupMenu control, 81, 88, 191 |
Find |
|
porting, 9 |
||
|
||
PowerPointApplication control, 89 |
it |
|
|
||
prebuilt program code, 209 |
faster |
|
predefined constants, 226 |
||
predefined properties, 226 |
at |
|
com.apress.http://superindex |
||
files, 255–258 |
||
Preferred player, 203 |
|
|
PrefsMenuItem value, 128 |
|
|
preventing programming errors, 324 |
|
|
Primary key, 279 |
|
|
Print dialog, 255–258 |
|
|
PrinterSetup object, 266–267 |
|
|
printing |
|
|
styled text, 258 |
|
|
PrintSettings object, 267 |
|
|
Professional version features, 12–13 |
|
|
Professional versus Standard REALbasic, 10 |
|
|
program code, 29, 187 |
|
|
ProgressBar control, 89, 194, 209 |
|
|
ProgressWheel control, 89 |
|
|
Project Controls option, 214 |
|
|
Project Editor, 42–45, 76, 201, 212, 221, 232, |
|
|
244, 277, 283 |
|
|
Project menu, 37 |
|
|
Project screen, 221, 225, 234, 275 |
|
|
Project tab, 32, 64 |
|