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


buttonStartStop_click Method

The button caption is initally 'Start'.

If you click the 'Start' button a timer starts, which signals the borrower every second.

You previously coded the borrower's response —
the check out or check in of a randomly selected book.

While borrowing starts the caption is changed to 'Stop'.

If you click the 'Stop' button the timer stops signalling the borrower, which stops the checking out and checking in.

Change the 1000 milliseconds timer period if you want.

Instructions

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

buttonStartStop_click(btn : Button input) updating;

begin
    if btn.caption = "Start" then
        myBorrower.beginTimer(1000, Timer_OneShot, 0);
        btn.caption := "Stop";
    else
        myBorrower.endTimer(0);
        btn.caption := "Start";
    endif;
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.