Home » Developer & Programmer » Forms » [newbie] problem with non blocking show_window
[newbie] problem with non blocking show_window [message #214037] Sat, 13 January 2007 18:32 Go to next message
provola74
Messages: 16
Registered: November 2006
Junior Member
I'm writing code using a dialog, i've this problem:


procedure pluto
begin
  proc1;
  show_window('dialog');
  proc2;
end;


Since 'dialog' is modal, as said on oracle docum., show_window is
a non blocking function call like go_item(first dialog item).
If i want to sequentially execute proc2 after closing the dialog I've to call proc2 in:
1- the trigger managing ok or cancel buttons. Or..
2- the when-window-close trigger at form level.

From the p.o.v. of sw. eng. this is a mistake, becase the secret encapsulated in the procedure pluto cannot be distibuted across other things not really concerning the secrets of pluto.

Is there any way to get or to emulate a blocking show_window ?

many thanks!!!
Re: [newbie] problem with non blocking show_window [message #214339 is a reply to message #214037] Mon, 15 January 2007 22:58 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I think I understand neither your solution nor your problem, but have you considered using the 'pause' command after either 'proc1' or 'show_window'?

David
Re: [newbie] problem with non blocking show_window [message #214397 is a reply to message #214339] Tue, 16 January 2007 04:38 Go to previous messageGo to next message
provola74
Messages: 16
Registered: November 2006
Junior Member
the pause command merely wait for a function key to be pressed..
..I'd like to wait until the windows is closed, without using cpu eating loops, like:
loop
  exit when select=true;
end loop;


I think, it is more clear.

sicerely
Re: [newbie] problem with non blocking show_window [message #214513 is a reply to message #214397] Tue, 16 January 2007 17:42 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I still don't understand your problem but have you tried putting a 'hide_view' after the 'show_view'? Alternatively use a 'go_item' to move the focus to another view/screen and 'hide' this screen that way?

David
Re: [newbie] problem with non blocking show_window [message #214568 is a reply to message #214513] Wed, 17 January 2007 02:37 Go to previous messageGo to next message
provola74
Messages: 16
Registered: November 2006
Junior Member
ok, let's synthesize my problem: I'd like to emulate the lov behavior, when I show the lov, with show_lov, the code calling show_lov wait until the lov is closed, then show_lov returns true or false, respect. if the user have or not selected any item in the lov.

This is an example, if u want another ex. think about the show_alert behavior...

The default behavior of a show_windows(windows_id) is rendering the window to the screen and then continue the execution of the next instruction following the show_window call, therefore the show_window-calling instructions block does not wait for the rendered windows to be closed.

The question is: is there any way of write a my_show_window(modal_win_id) proc/func suspending the main running sequence until the showed modal windows closes?
Re: [newbie] problem with non blocking show_window [message #214655 is a reply to message #214037] Wed, 17 January 2007 07:03 Go to previous message
sameer_am2002
Messages: 129
Registered: September 2002
Senior Member
Come on.. You can always work around with this..You can provide your logic to execute certain statements..for e.g you said
Proc1 ;
show_window('window') ;
proc2 ;

you want to hold proc2 till user dont exits called window..Now either you can do it with global variables or by coding proc2 in the exit button of the called window..

Ther's nothing so serious issues about that...
Previous Topic: regarding master-detail relationship
Next Topic: finding dataase server IP?
Goto Forum:
  


Current Time: Mon Mar 10 03:31:53 CDT 2025