| Subject |
Re: modal form |
| From |
Gaetano <gaetanodd@hotmail.com> |
| Date |
Thu, 20 Aug 2020 07:19:24 +1000 |
| Newsgroups |
dbase.getting-started |
Hi Lee,
I tried both codes, the super::readModal() option works, but "return
readModal()" produces the error "too few arguments, expecting at least
1" while opening the form in the navigator pane or during compilation.
I have Plus11 in case it matters.
Cheers,
Gaetano.
On 19/08/2020 16:57, Lee Grant wrote:
> 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>
|
|