Calling a form from a form called by a form problem [PDOXWIN 1.0]

Calling a form from a form called by a form problem [PDOXWIN 1.0]

Post by Mr C J Tilbu » Sun, 25 Jul 1993 23:34:17



Hi,

        I'm attempting to program a product/client/job control system
using Paradox for Windows, version 1.0. I've run into a problem which
I can't seem to solve (I can't actually see why it is occurring, so I
can't work out what needs to be changed.)

I have a 'master' form, which leads off into a series of 'editor'
forms. Then, each editor form may/may not call up a number of forms
(set with Modal Dialog Box properties) for input when the user wishes
to search for a field value, or move to a specific record number.

                 _____________[Master Form]_____________
                /               /       \               \
        [Editor1]       [Editor2]       [Editor3]       [Editor4]
        /       \       /       \       /       \       /       \
    (Goto)  (Search) (Goto) (Search)  (Goto) (Search) (Goto)  (Search)

[Name] is a standard Window, (name) is a modal dialog box.

When I run the editors individual, by 'open'ing them, then all works
fine. The Modal Dialog boxes function perfectly.

However, when I call the editors from the master form, and then call a
dialog box from the editor, when the dialog box formReturn()'s, not
only does it close (the editor .wait()'s on it and then .close()'s it)
but the editor in turn is closed. The Master form is conducting a
.wait() on the editor, which in turn .close()'s the editor when it
regains control.

So, it appears that the formReturn() from the dialog boxes is not just
affecting the editor, but also the form that calls the editor, which
closes the editor down.

Obviously, I would rather not that the editor closed as soon as it
carried out a search, successful or otherwise, so my question is, what
the hell am I doing wrong?

Can I call a form from a form thats already been called by another? Or
am I going to have to work around it?

Help?!?!?

-       Chris.

--

"The opinions stated above are mine. My employer can't have them, even if he
                  wants them. Unless I get a payrise ..."

 
 
 

Calling a form from a form called by a form problem [PDOXWIN 1.0]

Post by Mr C J Tilbu » Mon, 26 Jul 1993 02:32:47


Doncha just *despise* replying to your own articles :-)



Quote:>I have a 'master' form, which leads off into a series of 'editor'
>forms. Then, each editor form may/may not call up a number of forms
>(set with Modal Dialog Box properties) for input when the user wishes
>to search for a field value, or move to a specific record number.

>             _____________[Master Form]_____________
>            /               /       \               \
>    [Editor1]       [Editor2]       [Editor3]       [Editor4]
>    /       \       /       \       /       \       /       \
>    (Goto)  (Search) (Goto) (Search)  (Goto) (Search) (Goto)  (Search)

>[Name] is a standard Window, (name) is a modal dialog box.

>When I run the editors individual, by 'open'ing them, then all works
>fine. The Modal Dialog boxes function perfectly.

>However, when I call the editors from the master form, and then call a
>dialog box from the editor, when the dialog box formReturn()'s, not
>only does it close (the editor .wait()'s on it and then .close()'s it)
>but the editor in turn is closed. The Master form is conducting a
>.wait() on the editor, which in turn .close()'s the editor when it
>regains control.

From the 'ObjectPal(tm) Developers Guide', page 197 (Chapter 8, 'Display
Managers') ...

Modal example   When an ObjectPAL statement opens a form whose Modal property
                is set to True, the method does not suspend execution. For
                example, the following code opens MODFORM.FSL, a form whose
                Modal ... (etcetera).

Well, this isn't as true as it sounds. _My_ code was effectively this ...

        (from the opening Section)

        if categoryEditorForm.open("CATEGORY.FSL") then
                categoryEditorForm.wait()
                categoryEditorForm.close()
        else
                msgStop("Open Error.","Cannot open Category Editor.")
        endif

        (on the 'category editor' form)

        if gotoDlgBox.open("CATGOTO.FSL") then
                gotoDlgBoxReturned = gotoDlgBox.wait()
                [lots more code, that eventually ...]
                gotoDlgBox.close()
        else
                msgStop("Open Error.","Cannot open Dialog Box.")
        endif

        (on the 'Do-It!' button on my dialog box)

        [lots of checks on the field, to check it's a number then ...]
        formReturn("ok")

THIS IS THE PROBLEM ... The 'gotoDlgBoxReturned = gotoDlgBox.wait()' WASN'T
being executed. The Modal property of the dialog box halted execution the
calling method _immediately_ it was opened. So, when the dialog box did a
formReturn(), since there was no wait on the category editor for it, the
return effectively 'bubbled' through to the main section, and closed the
category editor. The dialog box closed, since it wasn't itself being waited
upon, but perversely, the formReturn() affected the original form's wait.

Either that, or I totally misunderstand the concept of modality.

Tell me it isn't me? Is it?

-       Chris.
--

"The opinions stated above are mine. My employer can't have them, even if he
                  wants them. Unless I get a payrise ..."

 
 
 

1. Calling the same form from within a form

Help wanted please!

I have an application based on NT, using Forms 4.5 and Oracle 7.3.4 (I
know - the client will update at sometime they say).  One of the
things they want to do is to call a form from within the same form.
The form is based on a view.  When I call the form again I get an
error saying cannot update view.  I normally use on-update triggers
etc to separate out the view, and update the separate tables.  However
these are obviously not being hit.  Anyone got any ideas on how I
could get this to work?

        Thanks

        Jo

/*
 Opinions expressed can be blamed only on the author - not her
employer.
*/
*************************************************

The usual - anything I say reflects on me, and not upon my current employer.

*************************************************

2. Using text column in Access

3. Proper way to call FORM from FORM??

4. Can Access 2000 use ADP with SQL 2000

5. 2 Forms PDX7.0 Calling form help needed

6. Why client machine takes too much memory and CPU cycles

7. VFP: Form calling another form?

8. How to check substring

9. calling a modeless form from a modeless form

10. closing a called form and opening another form

11. error messag, This.cmd2.setfocus() calling form 2 form form1

12. Forms 3.0 (PL/SQL 1.0) call to a V7 stored procedure

13. PdoxWin 1.0 alignment in free-form report fields