- Select the code on the left by clicking and dragging.
- Copy the code to the clipboard (CTRL-C).
- Select all the code in the code window (CTRL-A).
- Paste the code from the clipboard (CTRL-V).
- Select the Methods | Compile Method command.
The status line in the Class Browser displays
«Compilation complete - no errors»
- Select the Jade | Execute it menu command.
The status line will then display the message
«Execution complete»
Troubleshooting
If your code did not compile, an error message displays on the status line.
Click an error message to find out what to do.
Error 6050 - Cannot change name
Error 6090 - Cannot access protected property or method
Check Out the Borrowers?
The message «Execution complete» implies there are now
two Borrower objects in the database.
Examine these Borrowers by inspecting the database,
then close the inspector windows by selecting the File | Close All menu command. |
createBorrowers();
vars
brw : Borrower; // brw is a variable of type Borrower
// lowercase first letter for variable
// uppercase first letter for class
begin
beginTransaction; // required for database changes
// create a Borrower object and set its properties
create brw;
brw.name := "Jill Timpson";
brw.address := "16 Radley Road, Bishopdale, Oxford";
brw.memberNo := "H-1330651-4";
// create another Borrower object and set properties
create brw;
brw.name := "Ben H Collins";
brw.address := "53 Cliff Road, Sydenham, Oxford";
brw.memberNo := "H-1040155-7";
commitTransaction; // confirm update and release locks
end; |
|