Subject Re: modal form
From Gaetano <gaetanodd@hotmail.com>
Date Wed, 19 Aug 2020 00:27:27 -0400
Newsgroups dbase.getting-started


Thank you for the advice and sample code.

Andy Taylor Wrote:

> Gaetano,
>
> No, there isn't, not explicitly.
> However, you've done the right thing by setting your own custom flag in the code below via "intCheck.modal=true"
> The best place for this would be by overwriting the standard readModal method as follows:
>
> Within your form constructor code, or as "always there" code in your base form class:
>
> function readModal
>    this.modal = true    // set your modal flag
>    super::readModal() // calls the normal dBASE readModal method
>    return
>
> and for completeness....
>
> function open
>    this.modal = false  // set your modal flag
>    super::open()        // calls the normal dBASE open method
>    return
>
> That way you've just rolled your own permanent flag for this.
> Andy
>
> > Hi All,
> >
> > Is there a command/property that allows me to know whether a form was
> > opened with readmodal()?
> >
> > This is because I only want to release certain components on the form if
> > it was opened in isolation through the navigation pane. If it is opened
> > via the other form, I don't want to want to release those components
> > (e.g. _app.cursor)
> >
> > The form is called from another form as follows:
> >
> > local intCheck
> > set procedure to integrityAssessment.wfm additive
> > intCheck = new integrityAssessmentForm()
> > intCheck.mdi=false
> > intCheck.modal=true
> > intCheck.readmodal()
> >
> > Cheers,
> > Gaetano.
>