- 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 below for help.
Error 6050 - Cannot change name
Error 6090 - Cannot access protected property or method
Browse the Books?
The message «Execution complete» implies
there are now two Book objects in the database.
Next you will examine the Book objects by
inspecting the database. |
createBooks();
vars
bk : Book; // bk is a variable of type Book
// lowercase first letter for variable name
// uppercase first letter for class name
begin
beginTransaction; // required for database changes
// create a Book object and set its properties
create bk;
bk.author := "Bevan J Clarke";
bk.isbn := "1877267066";
bk.title := "An introduction to object-oriented"
& " systems development with JADE";
// create another Book object and set its properties
create bk;
bk.author := "David A Taylor";
bk.isbn := "0201309947";
bk.title := "Object Technology: A Manager's Guide";
commitTransaction; // confirm update and release locks
end; |
|