Jade 7

load Method Explained

Before the form is displayed the library's allBooks collection is associated with the list box.

Instructions

  1. In the Class Browser, select the ReservationForm.
  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;

vars
    coll : BookDictionary;
begin
    coll := LendingLibrary.firstInstance.allBooks;
    listBoxBooks.listCollection(coll, 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 ReservationForm.
  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 all notifications are stopped.

Instructions

  1. In the Class Browser, select the ReservationForm.
  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
    endNotificationForSubscriber(self);
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.