Subject |
Re: form to form |
From |
trevor <bob@bob.com> |
Date |
Mon, 21 Apr 2025 12:38:02 -0400 |
Newsgroups |
dbase.getting-started |
Mervyn Bick wrote:
> If there's something nasty in the second form this may not solve the
> problem but, instead of creating and destroying an instance of
> sub_dele.wfm every time the pushbutton is clicked, try creating the
> instance of sub_dele.wfm once in the form's onOpen event handler.
> Release the instance and close the procedure in the form's onClose
> event handler.
>
>
>
Mervyn.
With code in onopen and onclose, PB onClick produces error straight
away on opening form1, without even opening form2. Also produces
error for Form_onclose when closing form. If this was all in PB onClick
at least form2 would open first time.
If you * comment out ' set procedure' the error is not missing class
but variable oSub undefined (obviously) when form1 opens.
Comment out oSub and leaving set procedure gives class error. It would
seem it is ' Set procedure to ' within the form is causing the problem
not anything in form2 which is just a blank form with no components.
Which led me to.
I have several programs with set procedure to (developed many years
ago, memory not what it was) with no errors but none in forms and
discovered I used 'set procedure to addi' (additive?)[ possible a 2.21
thing]. Using this the forms now work as needed i.e I can call form2
repeatedly without closing form1.
Thanks for your input which led me to a solution.
Trevor
|
|