Re: Forms4 : Double-Click on Items ?

From: David R. Thrash <thrash_at_sbctri.sbc.com>
Date: 28 Jul 1994 18:34:37 GMT
Message-ID: <318tnt$4v5_at_sbctri.sbc.com>


> rusche_at_iw.uni-hannover.de (Henrik Rusche):

> > Hey,
> >
> > I want to perform some actions when the user double-clicks
> > a textitem.

Gentlemen,

Never tried this; but here's what I got from support when I posed the above Q:

Begin Quote from TAR

there are two pieces of code
first w/ three triggers

when-new-item-instance (on the item that you double click)  declare
  click_timer timer;
 begin
  if global.doubleclick = 'TRUE' then

     do_whatever_you_want;
     :global.doubleclick := 'FALSE';
  else
     :global.doubleclick := 'TRUE';
     click_timer := create_timer(timername,1000,no_repeat);
     /*set 1s timer, may need longer interval*/
     global.click_item := :system.cursor_item;
     go_item('some_other_control_item');
  end if;
when-timer-expired trigger
  :global.doubleclick := 'FALSE';
  if :system.cursor_item <> :global.click_item then     go_item(:global.click_item);
  end if;
when-new-form-instance
  :global.doubleclick := 'FALSE';

second method, simpler. it uses just one "WHEN" Item Level Trigger for whatever item you were going to double click on. Instead of having a When-Timer-Expired trigger setting variables, just test for the existance of the timer. Also I have have tested 200 milliseconds, and it is more than enough time for a double click event.
declare
  T timer;
  interval number(5) := 200;
begin
  T := find_timer('CLICK');
  if id_null(T) then
    T := create_timer('CLICK',interval,NO_REPEAT);   else
    \* Perform Object Action Here! EX: go_block(emp); *\   end if;  

                 Oracle Worldwide Technical Support - 08-MAR-94

end;

good luck.

End Quote from TAR.

I highly recomend O support. If you know how to work the system, you can get some real good results.

--
David R. Thrash
dthrash_at_sbctri.sbc.com                         Compuserve: 76217,1304

Thrash & Company
9102 Garland Road, Suite 216                   Voice:           214.327.1972
Dallas, Texas 75218                            Facsimile:       214.327.3510
Received on Thu Jul 28 1994 - 20:34:37 CEST

Original text of this message