Introduction  Instantiation  Events & Event Handlers   Global Methods & Properties 
Messages  Hints,Tips & Code  Links & Glossary  Two Demo Projects  Flow Diagram

LINKS AND GLOSSARY

LINKS

Real Software Inc. (makers of REALbasic)

RB Gazette

Community:

The La Jolla Underground

REALgurus

REALOpen

Really Basic REALbasic

Quantum Meruit

Garage Software

Athenaeum

Basic REALbasic

Joe's REALbasic Page

Tutorials:

Really Basic REALbasic

Information:

REAL gurus

Object-Oriented Programming Concepts

REALbasic University

ASCII Table

ResExcellence

REAL Software's NUG Archives

Thomas J Cunningham

Wikipedia

The VB Zone (RB)

Hints & Tips and Downloads:

REALbasic books

Bob Delaney's Science Software

Matt Neuburg's RB Page

Freak Software

Apple's Human Interface Guidelines

Postal Code (Look under "Open Source".

Famous Curves

BOOKS

REALbasic The Definitive Guide, Second Edition (2001), by Matt Neuburg. O'Reilly & Associates Inc. 700 pages. ISBN 0-59600117-0 Available form Amazon.co.uk for £12.00 (Second hand only but in fact new).

     I can strongly recommend this book for beginners. It complements the RB manual excellently. Its first 468 pages are a thorough tour of all the basic features of REALbasic which is very easy for beginners to read and understand. It covers, for example, Fundamentals including the BASIC language, Objects and Classes, Data Types and the User Interface including Controls, with many small items of code to demonstrate techniques, with explanations. The remaining 230 pages go into additional areas that the beginner will probably not want to get involved in at first but which will later become a gold mine. A great strength is its explanation of how RB works. The whole book can be used as a Reference, and it is easy enough to read and is logically set out so it can also be read from cover to cover. It is both practical and provides information which makes it easy for the reader to understand the principles. It is slightly out of date but that does not detract from it significantly. I understand that there is no plan to produce a third edition.

REALbasic For Macintosh (one of the Visual Quickstart Guide series), by Michael Swaine. Peachpit Press. 395 pages. No publication date but the copyright date is 2003. ISBN 0-201-78122-0 For REALbasic 3.5 to 5.

     The V Q Guide for Adobe InDesign is based throughout on a successful task-based formula, consisting of a large number of short snappy individual mini-sections about a half to a page in length describing clearly and effectively how to do just about anything after finding the required task in the index. Each mini-section stands on its own without the need to refer to any other part, and it was on the strength of that formula that I bought the version for RB. However, that depends much more on two tutorials covering 60 pages and when the reader finds a task that he wants to learn about in the index he sometimes finds it embedded in one of the tutorials which requires reading several pages, some not relevant to the task being consulted, to get the particular instructions he wants. There is a wealth of tutorials in the REAL Software's RB package and on the Internet and a VQS guide structured like the one for InDesign would have been a very valuable counterpart to those. I therefore found it at first slightly less helpful than I expected although perhaps computer programming is less suited to a task-based formula. However, it has some useful practical sections on working with files, pictures, animations, movies, databases, communications and scripting which follow the VQS task-based formula. It also has a useful chapter about programming strategy. Quite a useful book which complements "The Definitive Guide" to some extent.

GLOSSARY

     Not many manuals or books actually define terms used. I find definitions useful and the following is my collection of terms that I have met, described for the beginner.

     App Class The Application Class (or more correctly, an Instance of it) is Instantiated when your application starts and remains until it quits. It is empty in the sense that there is no Code in it. Beginners need not know more than the following: It is the place to create and store things - Constants, Methods and Properties (Variables) - that you want to be available to ("seen" by) all code in all parts of your program (remembering that an item created in the Source Code of a window is not available outside that Source Code. See Scope). Examples are Properties acting as Variables such as a counter, or a general purpose Method such as the Wait Method or the WindowArea Function. When Calling an item in the App Class when the Call itself is not in the App Class, you must preface its Call with "App.", as in "App.PopulationCounter" so that RB knows where to look for it.

     Assign Make the Value of a Variable, Constant or Property equal to a certain quantity. As in Window1.Width = 250; Counter = Counter + 1, FoundWord = "Aardvark"; Available = WindowArea(Window3 (where WindowArea() is a Function). The Value Assigned must be of the same Data Type as that specified when the Instance of the Variable, Constant or Property is Declared (created).

     Boolean (number) See Data Type.

     Call The inclusion, in a block of code, of the name of a Method which causes that code to divert execution to that Method. When execution of the code in that Method is complete, execution Returns and continues at the line immediately after the Call. A Function can also be Called but it must be immediately preceded by a word that is capable of having Assigned to it the same Data Type as the Value being Returned by the Function. Examples of Calls are:

Calculate  "Calculate" is a Subroutine, that you have created, that carries out a calculation, probably Referring to various Variables held elsewhere in the program.

Wait(4)  "Wait" is a Method that pauses execution of the program for (in this case) 4 seconds.

MsgBox GetSurname  "GetSurname" is a Function that Returns someone's surname as a String which is the only Data Type that MsgBox can have Assigned to it.

ClassSize = NumberOfChildren(7)  "NumberOfChildren()" is a Function that Returns the number of children in the Year number which has been passed as an Integer Parameter, and the Data Type of the Property (Variable) "ClassSize" must be Integer.

     Class A hierarchical category of objects with the term "Class" near the top. An Object lower down the hierarchy has the same Properties and Events as the SuperClass to which it belongs, which means that it might have some additional Properties and Events special to that Class. For example, the PushButton Control inherits Properties and Events from its SuperClass - RectControl. From the RB Language Reference can be discovered a hierarchy of Classes (the following does not include all the Classes):

     Compile The process of converting your Project into the language that the host computer's operating system will understand (consisting of numbers which is all that computers can understand deep down). It creates a stand-alone Application (one that can be run without REALbasic being present Choose File > Build Application). RB also Compiles your Project when you run it in the debugger (Debug > Run) so that you can quickly see how it will perform. The process of Compiling will check for errors but Run-Time Errors will only appear when the application is run.

     Constant Like a Variable but once Declared it can't be changed in code. Its Data Type can be only a number, String or Boolean. Used for storing Data which must not be changed in code, like the year of the Norman Conquest (1066), Pi (3.1417), a list of the names of the planets ("Mars,Venus,Earth,Jupiter,Saturn ...")

     Control Any Object contained in the Controls Palette. You drag them from there on to an open window of your Project. Examples are: Pushbutton, EditField, Check Box, Timer. Most Controls provide the interface between the user and the application but some do not and therefore do not appear when the Project is Compiled. Examples of these are: Timer and Noteplayer. A Control has several Events associated with it such as 'MouseDown", "ValueChanged".

     Data Type The different Types of Data. These are:

Scalar (Numbers: Integer, Single, Double, Boolean); String; and Color.

Integer is a "whole number", neither a fraction nor having a decimal point. It is capable of holding any such Data up to ± about 2 Billion.

Single is a decimal number of Single precision capable of holding any such Data up to ± a number with 38 zeros.

Double is a decimal number having Double precision capable of holding any such Data up to ± a number with 308 zeros!

String is (in the words of the RB manual, copyright acknowledged) "just a series (or String) of characters. Basically any kind of information can be stored as a String. “Jeannie”, “3/17/98”, “45.90” are all examples of Strings."

Boolean can take only two Values: "True" or "False". A piece of code that might confuse you if you see it in a Project is something like "If PushButton1.Enabled Then ... do something". " What this means is "If the Enabled Property of PushButton1 is True (ie., it is checked in PushButton1's Properties Window or has been Set to "True" by code during the running of the program) Then .... do something". When encountering this line of code, RB first enquires whether the Value of "PushButton1.Enabled is "True". If so, it executes the rest of the code in that "If/End If" section; otherwise it doesn't. The code can be written as "If PushButton1.Enabled = True Then ... do something" which is clearer for beginners.

Color is a Data Type that stores a Value in the form of that Data Type. (Remember to spell it in the American way.) Beginners will usually confine themselves to the RGB system of specifying colours. Eg., the following in a window's "Open" Event Handler

Dim c As Color
c = RGB(255,200,200)
Window1.BackColor = c

produces a pink (provided Window1's HasBackColor Property is checked in Window1's Properties Window or has been Assigned in code the Value "True".

Non-Scalar (the rest, which are all Objects such as Date, Window, FolderItem, Picture).

(See the part in the page "Instantiation" covering the different Instantiation requirements for Scalar and non-Scalar Data Types.)

     Declaration As a verb ("Declare"), the act of writing the details of a Constant, Property or Method such as its name and its Data Type. As a noun, the above details. I have found that when used in connection with a Method, its meaning is sometimes confined to the first line, eg., Sub XYZ() As <Data Type>, or Function XYZ() As <Data Type>, excluding the code which follows it.

     Double (number) See Data Type.

     Default Window The window which opens immediately the application launches. If there is more than one window, you can specify which one will be the default by choosing Edit > Project Settings.

     Event Please see the page Events & Event Handlers. (For "Event Handler" see also Method)

     False A Value (one of only two) that can be Assigned to a Boolean Property or Variable. Opposite of "True". See Data Type.

     Function See Method.

     Global Opposite of "Local". A Constant, Method or Property (Variable) is Global in Scope if it is available (can be Referred to) by all code in the Project or application, provided that when it is Declared its Scope is Set to "Public". See also App Class.

     IDE "Integrated Development Environment". You are "in the IDE" when you see the Project Window on the screen and can open Source Code windows. At this stage your work is called "The Project". This is the environment where you create Controls, Windows, Menus, Event Handlers, Methods and other computer code written in RB's version of the BASIC language. When you later Build your Project and launch (run) the resulting application, you are no longer in the IDE.

     Initialise To Assign a Value to a Constant or Property (Variable) at some beginning stage such as when the application is launched or a Method is first executed.

     Instance or Instantiate See Instantiation.

     Integer See Data Type.

     Local Opposite of Global. A Constant, Method or Property (Variable) is Local in Scope if it is available to (can be Referred to by) code in the same Source Code and nowhere else.

     Message Please see the page on this site called Messages.

     Method

     I found the definition of this word elusive as experts seem to use it and also other terms (Subroutine or Procedure) to refer to what seem to me to be Methods. In your progress with RB, keep the following definitions in mind and reach your own conclusions:

A general word for a block of executable code with a particular name attached which is Called by other code, sometimes several times during the running of a program. Nearly all (perhaps all) the code that you will see in RB on your screen is contained in a Method.

See also the Global Methods & Properties page. Examples are:

Event Handlers, Menu Event Handlers; These are essentially Methods with a special name. (There is a difference between a Handler and a Method but the distinction need not concern beginners.) They are associated with an Event (eg., "PushButton1 has been pressed", "File > Quit has been chosen".) For a full explanation please see the page "Events"

Several built-in RB commands that you can issue to a window such as "Hide". (Please see the RB Language Reference, "Window Class", in the electronic version choosing "Window" in the Alpha column then find "Window Class" next to it). In EditField1.SetFocus, "SetFocus" is a Method recognised by the Control Object "EditField1". "Close" in Window1.Close is a Method recognised by the Object "Window".

Code that you write like a Wait Method (Subroutine) to cause a pause in the execution of a program, or a WindowArea Function to Return the area of a named window.

A Subroutine is a Method whose main purpose is to execute code which has an effect somewhere in the programme. The space where you write the code is always provided with a heading (Declaration) "Sub()", and also an ending "End Sub", neither of which you can delete. An example is my demo Wait Method in the Hints, Tips & Code page.

A Function is a Method whose main purpose is to Return a Value which can be Assigned to a Variable in the code Calling the Function. Its usefulness is to get one Value (only one is allowed) which is needed immediately. An example is my demo WindowArea Function. The space where you write the code is always provided with a heading "Function()" and an ending "End Function", neither of which you can delete.

Many Classes built-in to RB have Methods - please see the Language Reference. Look here to find out how to create a Method.

     Parameter Depending on their Declaration, some Methods must be accompanied, within the code Calling them, by one or more items of data to allow them to do what you want. These items are called Parameters. The expression used is "passing a Parameter". For example, in a Method (it could be one built-in to RB or perhaps one that you have created):

Wait(4) This causes a pause in execution for 4 seconds. The "4" is the Parameter which must be of the same Data Type as that specified in the Declaration of the Method.

     Project See IDE.

     Property Two meanings:

     1. A feature of a Control, a window and several other Objects; or

     2. It can "stand-alone" acting as a Variable.

     1. When acting as a Property it can be viewed and changed by you in the Properties Window (Window > Show Properties) or by code. In this piece of code: EditField1.Text = "Hello", "Text" is a Property of the Control Object "EditField1", and the Value of the data that you enter into the Properties Window ("Hello") appear in EditField1. When you are satisfied with the Values of the properties as shown in the Properties Window and Compile your application, the application uses these Values as Starting Values because the application uses them when starting to run. However, code can change them during the running of the application.

     2. Properties can be created by you to act as Variables to store data used by your running application (although RB knows them as Properties). For example a Property called Counter could allow your code to keep track of how many times something has been done. Look here to find out how to create a Property.

     Be sure to understand Assignment and Data Types.

     Reference/Refer Means to include the name of an object or Constant, Method or Property (Variable) in some code with the result that it will be processed in a way determined by its Declaration or nature and by the code which Refers to it. Eg., "Window1.Left = 34" contains a Reference to Window1 and to a Property called "Left" (a Property that applies to many objects but in this case Refers only to the Left Property of Window1.)

     Return Two meanings:

1. "Come back to where it came from", as when a Call to a Method has been completed, the expression used by programmers is eg., "Execution of the Method Returns to the line of code making the Call"; and

2. When a Function is Called, it presents - Returns - a Value to the line of code Calling it for further processing there. (Please see Window Area Function.)

     Run-tme Error An error produced by RB when the application has been executed (as distinct from a Compile error produced during Compilation which often results from a syntax mistake). An example of a Run-Time Error is if during the running of the application a variable (say, X) became zero, perhaps after some time and after the user had exercised a lot of the features of the application. Then the application's code encountered a calculation like Y/X. A "Division by zero" error would occur. That could not be caught during the Compiling of the Project because the value of X during the whole running of the application would not be knowable.

     Scalar See Data Type.

     Scope Applies to a Constant, Method or Property (Variable). Please see Global and Local.

     Set Short for "Assign a Value to a Constant or to a Property (Variable)" As in "Set the window's "Left" Property to 200 pixels".

     Single (number) See Data Type

     String See Data Type.

     Subroutine See Method.

     True A Value (one of only two) that can be Assigned to a Property, Variable or used as a Parameter, which is of the Data Type "Boolean". The opposite of "False". See Data Type.

     Value The quantity of a Datum (an item of Data) in the form of one of the allowed Data Types which has been Assigned to a Property (Variable) or Constant, or used as a Parameter, or is Returned by a Function. Eg., Window1.Left = 250. "250" has now become the Value of the Left Property.

     Variable A place, with a name which can be Referred to, to store data whose Value must be able to be changed during the running of your Project or application. Opposite of a Constant. See also App Class and Property.

Introduction  Instantiation  Events & Event Handlers   Global Methods & Properties 
Messages  Hints,Tips & Code  Links & Glossary  Two Demo Projects  Flow Diagram