- Select the code on the right 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 menu 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 6026 - Unknown property or method
Error 6090 - Cannot access protected property or method |
createLibraryAndBooks();
vars
lib : LendingLibrary; // lib of type LendingLibrary
i : Integer; // i is an Integer variable
bk : Book; // bk is of type Book
begin
beginTransaction; // needed for database changes
create lib; // create root object
foreach i in 1 to 9 do // create books inside a loop
create bk;
bk.title := "Power of JADE - Volume " & i.String;
bk.library := lib;
endforeach;
commitTransaction; // update and release locks
end;
| |