11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Three triggers are used in this example, a When-Mouse-Click trigger, a When-Timer-Expired trigger,<br />

and a When-Mouse-DoubleClick trigger.<br />

/*<br />

** trigger: When-Mouse-Click<br />

** Example: When the operator clicks the mouse, create a timer<br />

** that will expire within .5 seconds.<br />

*/<br />

512<br />

DECLARE<br />

timer_id TIMER;<br />

timer_duration NUMBER(5) := 500;<br />

BEGIN<br />

timer_id := Create_Timer(’doubleclick_timer’, timer_duration,<br />

NO_REPEAT);<br />

END;<br />

/*<br />

** trigger: When-Timer-Expired<br />

** Example: When the timer expires display the online help<br />

** window if the operator has double-clicked the<br />

mouse<br />

** within .5 seconds, otherwise display the product<br />

** information window.<br />

*/<br />

BEGIN<br />

IF :Global.double_click_flag = ’TRUE’ THEN<br />

Show_Window(’online_help’);<br />

:Global.double_click := ’FALSE’;<br />

ELSE<br />

Show_Window(’product_information’);<br />

END IF;<br />

END;<br />

/*<br />

** trigger: When-Mouse-DoubleClick<br />

** Example: If the operator double-clicks the mouse, set a<br />

** flag that indicates that a double-click event<br />

** occurred.<br />

*/<br />

BEGIN<br />

:Global.double_click_flag := ’TRUE’;<br />

END;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!