FORM6i : Multi-form problem

Posted on 2003-03-18
Medium Priority
Last Modified: 2013-12-12
Would be great if anyone could help me with this:
Say I have two forms A and B, A has a repeating timer
which, when fires, will GO_FORM to B and B's WHEN-WINDOW-
ACTIVATED should fire and do stuff. Problem is if
the focus is already on form B at the beginning,
form A's timer expires but form B's WHEN-WINDOW-
ACTIVATED trigger doesn't fire as it IS already the
active window of the two at the time of the timer
expiration. So the stuff in B's WHEN-WINDOW-ACTIVATED
won't execute when I want it to.

Any workaround? I need a solution to this urgently.
Thanks big time in advance!!
Question by:kdnt
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 22

Expert Comment

by:Helena Marková
ID: 8202182
It is an interesting question. Maybe the solution is putting code from When-Window-Activated trigger to the When-New-Form-Instance ?

Accepted Solution

mahbub007 earned 200 total points
ID: 8202386
hi jdnt,
      what u want to do is not logical actually.but even then, if the when-timr-expired fires in form 'a' and u go_form to form 'b' then the when-window-activated trigger in form 'b' fires and some staff is done but the problem is, after this is happened ,in the form 'a' the when-timer-expired trigger fires but in the form 'b' the when-window-activated trigger does not fire, is not it?
  actually when the focus is in form 'b' then again a when-window-activated will not fire,so what u have to do is ,u have to use the go_form builtin to move the focus again in
form 'a',in the code of when-window-activated
trigger ,after the code for the stuff u want to be done .
once ur when-window-activated trigger is fired for one form 'b' then in no way it will fire again if the focus is still in that form.so u have to have the focus moved to another form 'a' and again move to form 'b' then ur when'-window-activated will fire.follow the way:
1.suppose u created the timer in when-new-form-instance trigger of form 'a'-

tt timer;
note:u may use a button to initiate the timer as well.

2.in the when-timer-expired trigger of form 'a' place the code -

if not id_null(find_form('b'))then
end if;

note: here u just going to form 'b' that means form 'b'
 is already opend by any means.

3.in the when-window-activated trigger in form 'b' place the code -

ur stuff;
if not id_null(find_form('a'))then
end if;

4.u have to create one new trigger in form 'a' that is
when-form-navigate,the code will be -

     tt timer;
if id_null(find_timer('t1')) then
tt := create_timer('t1',2000,repeat);
end if;
end ;

 in this way u delete the timer in the expiration of the timer and again while coming to form 'a' u r creating the timer.this is because if u continue with the
timer which is created at first moment ,when u come back to form 'a' from form 'b' ,the when-timer-expired trigge does not work properly (i tested this method);
so when the focus is sent to form 'a' through the when-window-activated trigger of form 'b' ,the when-form-navigate trigger of form 'a'again create the timer ,so the when-timer-expired trigger in form 'a' will fire in due time.again the when-timer-expired trigger will send the focus to form 'b' and the when-window-activated triger of form 'b' will fire.
 here a point to be noted that wh-win-active is a trigger that fires at the very first moment when focus is sent a form.so if u go to the earlier form using go_form builtin from this trigger ,u dont have any chance to do any work in the form where wh-win-active fires.
  thats why at the very first line of this comment i told 'what u want to do is not logical'.


Author Comment

ID: 8207127
Not sure if I understand you totally, but thanks mehbub
for your lengthy response, I'll look for alternatives.

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question