I want to stop loop through push button forms 10g
I want to stop looping through push button forms 10g it is like (SwingWorker() in java) (DoEvent() in .net)
The problem in forms 10g that when you start looping the form will freeze and you can't push any button on form, I found solution for that in form 6i through package d2kwutil **WIN_API_UTILITY.InterruptCheck(hButton)**
But in 10g I can't find solution, Please help>>>>>
declare
hButton PLS_INTEGER;
begin
:interruptcheck.counter := 0;
hButton := get_item_property('INTERRUPTCHECK.PB_OFF',WINDOW_HANDLE);
go_item('interruptcheck.loopcount');
set_item_property('INTERRUPTCHECK.PB_OFF',ENABLED,PROPERTY_TRUE);
set_item_property('INTERRUPTCHECK.PB',ENABLED,PROPERTY_FALSE);
set_application_property(CURSOR_STYLE,'HELP');
set_application_property(CURSOR_STYLE,'<d2kwut60>WAIT');
for i in 1..:interruptcheck.loopcount LOOP
if WIN_API_UTILITY.InterruptCheck(hButton) then
exit;
end if;
:interruptcheck.counter := i;
synchronize;
end loop;
set_item_property('INTERRUPTCHECK.PB_OFF',ENABLED,PROPERTY_FALSE);
set_item_property('INTERRUPTCHECK.PB',ENABLED,PROPERTY_TRUE);
set_application_property(CURSOR_STYLE,'DEFAULT');
end;
Edited by: wael amar on May 1, 2010 11:03 PM