Subject Re: modal form
From Lee Grant <camilee@nospam.comcast.net>
Date Wed, 19 Aug 2020 02:57:40 -0400
Newsgroups dbase.getting-started

Andy,

Where were you when I was discussing the use of super:: a while back. :)

Anyway, in that discussion,  it was brought up by Ken that the use of
super:: sometimes worked, sometimes didn't, but regardless, what I
noticed is that folks tend to have been putting the overridden function
on the back of the return statement, ie:

  function readModal
      this.modal = true    // set your modal flag
      //super::readModal() // calls the normal dBASE readModal method
      return readmodal()         // have seen this being the norm

Are you aware of any reason in the difference of application?

The earlier discussion ended up disclosing that my function wasn't
applicable, since my use of it was used in another programming language
where even subclassing was ended with a call::super to reinvoke the
inclusion of stock code behavior where not overidden.

Lee

On 8/18/2020 6:38 PM, 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
>
<snip>