modify form test
do nothing, save the form.
at command window, "DO FORM TEST", the form will pop up and return you
to command window.

How could I recreate the sequence programmatically?

I tried:

myform=createobject("form")
myform.show(1)

and

myform=createobject("form")
myform.show(0)
read events

The form would appear, but the command window disappeared. It's unlike
the previous case of "DO FORM TEST".

So how did "do form" execute the form?

--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 4:40pm up 7:07 0 users 1.00 1.00

Re: do form vs createobject() by toylet

toylet
Mon Mar 01 03:14:58 CST 2004

hmm.. what I really want is to reproduce the behaviour of "DO FORM"
without using "DO FORM", using CREATEOBJECT() and the form's methods
only. I wonder whether it's possible.

toylet wrote:
> modify form test
> do nothing, save the form.
> at command window, "DO FORM TEST", the form will pop up and return you
> to command window.

--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 5:12pm up 7:39 0 users 1.01 1.00

Re: do form vs createobject() by Stefan

Stefan
Mon Mar 01 04:00:09 CST 2004

You can do the same by keeping the CreateObject'ed
variable (reference) in scope. The command window does
it automatically; in a prg / method you'd create your own
place (i.e. Public in a test.prg, or in "real" code probably
use a parent form property, public form manager object's
property etc.)
Public oForm
oForm = CreateObject('Form')
oForm.Show() && modeless


hth
-Stefan

"toylet" <toylet_at_mail.hongkong.com> schrieb im Newsbeitrag
news:OlDBum2$DHA.2808@TK2MSFTNGP10.phx.gbl...
> modify form test
> do nothing, save the form.
> at command window, "DO FORM TEST", the form will pop up and return you
> to command window.
>
> How could I recreate the sequence programmatically?
>
> I tried:
>
> myform=createobject("form")
> myform.show(1)
>
> and
>
> myform=createobject("form")
> myform.show(0)
> read events
>
> The form would appear, but the command window disappeared. It's unlike
> the previous case of "DO FORM TEST".
>
> So how did "do form" execute the form?
>
> --
> .~. Might, Courage, Vision. In Linux We Trust.
> / v \ http://www.linux-sxs.org
> /( _ )\ Linux 2.4.22-xfs
> ^ ^ 4:40pm up 7:07 0 users 1.00 1.00


Re: do form vs createobject() by toylet

toylet
Mon Mar 01 04:07:00 CST 2004

> You can do the same by keeping the CreateObject'ed
> variable (reference) in scope. The command window does
> Public oForm
> oForm = CreateObject('Form')
> oForm.Show() && modeless

I knew why I failed. my oForm was a private variable in a PRG, when the
modeless form started, program execution continued to the end of the
PRG, when variable oForm gets out-of-scope. The form referenced by oForm
was released as a result.

--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 6:04pm up 8:31 0 users 1.12 1.03

Re: do form vs createobject() by toylet

toylet
Mon Mar 01 05:04:36 CST 2004

thank you.


--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 7:04pm up 9:31 1 user 1.05 1.01

Re: do form vs createobject() by Stefan

Stefan
Mon Mar 01 05:11:09 CST 2004


"toylet" <toylet_at_mail.hongkong.com> schrieb im Newsbeitrag
news:OZg8iT3$DHA.4060@TK2MSFTNGP10.phx.gbl...
> > You can do the same by keeping the CreateObject'ed
> > variable (reference) in scope. The command window does
> > Public oForm
> > oForm = CreateObject('Form')
> > oForm.Show() && modeless
>
> I knew why I failed. my oForm was a private variable in a PRG, when the
> modeless form started, program execution continued to the end of the
> PRG, when variable oForm gets out-of-scope. The form referenced by oForm
> was released as a result.

So, your is problem solved or did I misunderstand the
question? (or just the reply? :-)


-Stefan