PWbreak: Leaving the system cleanly
Purpose
At some stage, you might want to leave the ProWesS window cleanly without
the user hitting the Quit item. We have seen in the PWactivate keyword that only a return with the
user having hit quit in the window is a clean return. You can also make a
clean return with this keyword. This tells the system that, the next time
you go back to it via PWactivate, it should shut down the window cleanly as
if the user had quit, and then return to SBasic.
Thus, you should use this keyword anywhere in a procedure called from the
main loop (as set out in the PWactivate chapter) and then go back to the
loop. This then does a last PWactivate call, and then this call returns
with mempointer=0 : a clean exit.
The syntax of this command is quite simple:
PWbreak
outline_object
where outline_objet is the outline object used by the PWactivate call.
outl_obj=PWcreate (0,PW('TYPE_OUTLINE'),tags....)
(...)
REPeat loop%
mem=PWactivate(outl_obj,mem,obj,add_info,hit%)
if mem=0:EXIT loop%
SELect ON obj
= (...)
= whatever
call_a_procedure
IF problem : PWbreak outl_obj
(....)
END SELect
END REPeat loop%
PROGS, Professional & Graphical Software
last edited 1996 May 29 (wl)