Kbase 18814: Default button and triggers
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/03/2000 |
|
Default button and triggers
DRAFT COPY - Currently under review and edit.
INTRODUCTION:
=============
Trigger behaviour involving default buttons may cause some confusion.
The following should help explain what is happening.
EXAMPLE: Dialog window with a fill-in. A leave trigger on the fill-in
and a choose trigger on the button. If fill-in has focus and the user
presses return the choose trigger fires before the leave trigger. Why?
This happens when the button is an AUTO-GO button. It happens
because Progress does not move focus to the default button when
you press the RETURN key. The LEAVE event occurs when the dialog
is being hidden. The sequence of events is:
Focus is in the fill-in
User presses the RETURN key (focus does not change)
Progress generates a CHOOSE event for default button
The CHOOSE trigger fires
The CHOOSE trigger displays a message
The CHOOSE trigger ends
Progress generates a GO event for dialog frame (because of AUTO-GO)
The WAIT-FOR GO OF frame is broken
Progress generates a LEAVE event for the current focus widget (fill-
in)
The LEAVE trigger fires
The LEAVE trigger displays a message
The LEAVE trigger ends
If you remove the AUTO-GO option from the default button and add
APPLY "GO" TO FRAME dialog-frame in the CHOOSE trigger for the button,
you have a bit more control over what happens. This rearranges the
sequence of events to:
Focus is in the fill-in
User presses the RETURN key (focus does not change)
Progress generates a CHOOSE event for the default button
The CHOOSE trigger fires
The CHOOSE trigger applies "GO" to the frame
The WAIT-FOR GO OF frame is broken
Progress generates a LEAVE event for the current focus widget (fill-
in)
The LEAVE trigger fires
The LEAVE trigger displays a message
The LEAVE trigger ends
The CHOOSE trigger displays a message
The CHOOSE trigger ends
MWH (05/05/1999)
Progress Software Technical Support Note # 18814