JADE is an advanced software platform that has an integrated software development environment, a language, an object manager, and a high performance database.


load Method Explained

Before the form is displayed

  • A borrower object is created
  • The form caption is set
  • The borrower's collection of checked out books is associated with the list box

Instructions

  1. In the Class Browser, select the RandomBorrowerForm.
  2. In the properties window, select <form>.
  3. In the methods window, select load.
  4. Copy and compile the code on the right.

load() updating;

begin
    beginTransaction;
    create borrower;
    commitTransaction;
    caption := "Books for " & myBorrower.String;
    listBoxBooks.listCollection(myBorrower.myBooks, true, 0);
end;

displayEntry Method Explained

In the load method you specified the collection to be used for the list box.

Now you must specify the text to be displayed for each object in the collection.

Instructions

  1. In the Class Browser, select the RandomBorrowerForm.
  2. In the properties window, select listBoxBooks.
  3. In the methods window, select displayEntry.
  4. Copy and compile the code on the right.

listBoxBooks_displayEntry(listbox: ListBox input; obj: Any;
                          lstIndex: Integer):String updating;

begin
    return obj.Book.title;
end;

unload Method Explained

Before the form is unloaded

  • The borrower object is deleted.
  • The checked out books no longer reference the borrower (JADE automatic maintenance).
    In effect the books are checked in.

Instructions

  1. In the Class Browser, select the RandomBorrowerForm.
  2. In the properties window, select <form>.
  3. In the methods window, select unload.
  4. Copy and compile the code on the right.

unload() updating;

begin
    beginTransaction;
    delete borrower;
    commitTransaction;
end;

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 Contents
 

For maximum reliability, security and performance of your JADE solution, JADE Care24 is our fully comprehensive systems management offering.