Why frm.wait 
Author Message
 Why frm.wait

My main form which calls all other forms uses the form.wait() after the call.
Is this necessary?  I guess I don't really mind if the user wants to start
several copies of the called form.  How then do I assure that the called form
is closed properly.  Paradox documentation clearly says that the calling form
must explicitly close the  called form (the called form cannot properly close
itself before returning).

If I don't use waits, I don't know when the called form is completed.
Therefore I can't  'frm.close' it.  Is this a problem?

Wristdoc



Fri, 06 Sep 2002 03:00:00 GMT
 Why frm.wait

: My main form which calls all other forms uses the form.wait() after the call.
: Is this necessary?  I guess I don't really mind if the user wants to start
: several copies of the called form.  How then do I assure that the called form
: is closed properly.  Paradox documentation clearly says that the calling form
: must explicitly close the  called form (the called form cannot properly close
: itself before returning).

: If I don't use waits, I don't know when the called form is completed.
: Therefore I can't  'frm.close' it.  Is this a problem?

Form.wait() is essential if you want to insist that the user close
the form being called before returning focus to the calling form.
Doesn't sound like that's what you want to do.

I would discourage you from letting the user open multiple copies
of the same form, though.  Not only does it slow things down and
waste resources, but it can be confusing to the user and cause
errors if, say, one copy of the form has data entered but not yet
posted.  The user looks at another copy of the form and decides
the data he tried to enter "didn't take."

The standard way to do this is to try attaching to the form if
it is open.  The parameter taken by attach() is the form's title,
not its file name.  Like so:

var
  f  form
endvar

if f.attach("Juice Flavors") then
  f.bringToTop()
else
  f.open("JUICE")
endif
--
Rick Carter



Fri, 06 Sep 2002 03:00:00 GMT
 Why frm.wait

Quote:


>: My main form which calls all other forms uses the form.wait() after the call.
>: Is this necessary?

Wait is useful when you want to duck out of the current form to grab
some info that you will use in the calling form.  Let's say you want
to e-mail a document to a client. You would have button on the client
form that would take you to a form where you could select the document
you want to send.  You would want to wait on that called form, but you
wouldn't want to close the called form until you had gotten the info
from it.  So you do a formReturn, go back to the calling form,
reference the info from the called form, and then close the called
farm and go about your business.

Ken



Fri, 06 Sep 2002 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. FRM-40735 and FRM-40815

2. Why graphics wait till previous for i = 1 to 100000

3. Printer waits till Program Ends on Novell - Any clues as to Why

4. Users Waiting - What resource are they waiting on

5. q: buffer busy wait(data block wait) when P3=130

6. PL/SQL log sync waits, log file parallel write waits and redo writes

7. Process waiting after issuing OPEN CURSOR, onstat shows a thread in waiting condition await_MC1

8. Wait/No wait option, transaction and ODBC

9. SELECT query in Access97 to SQL 6.5 returning wrong records - why Why WHY

10. SELECT query in Access97 to SQL 6.5 returning wrong records - why Why WHY

11. WHY WHY WHY!!!!

12. Why why why?? help please


 
Powered by phpBB® Forum Software