The object that caused the notification is passed as a parameter.
The method determines whether the book has been checked in or checked out.
For a check in, a message is displayed on the status line with a yellow background.
For a check out, a message is displayed on the status line with a green background.
Instructions
- Select the ReservationForm.
- In the properties window, select <form>.
- In the methods window, select sysNotify.
- Copy and compile the code on the right.
|

sysNotify(eventType : Integer; theObject : Object;
eventTag : Integer) updating;
vars
bk : Book;
begin
bk := theObject.Book;
if bk.myBorrower = null then
statusLine.backColor := LightYellow;
statusLine.caption := "'" & bk.title & "' checked IN";
else
statusLine.backColor := LightGreen;
statusLine.caption := "'" & bk.title & "' checked OUT";
endif;
end; |
|