| Subject |
Re: modal form |
| From |
Lee Grant <camilee@nospam.comcast.net> |
| Date |
Fri, 21 Aug 2020 22:15:32 -0400 |
| Newsgroups |
dbase.getting-started |
Andy,
No shame in being efficient, if you know what you're doing.. :) However
all of us aren't in that group yet. :)
This code, I can understand, because I see the intent of the shortcut,
which returns the value of the logical to return. I was just curious, as
Mervyn pointed out, why there were different applications applicable,
and apparently the answer is dependent on the chain and number of
objects involved. As most things are not exceedingly complicated at the
lower level programmers level other than a once removed subclassing of
an object, the harm that could be done when there are further levels of
objects...and hence...something I needed to know.
However, I appreciate the coming down to our level of you higher ups to
explain the lack of our knowledge about your programming code. :)
We'll get there yet and be able to explain to someone else later
on...maybe. :)
Lee
On 8/21/2020 5:17 AM, Andy Taylor wrote:
> Lee,
>
> Missed that discussion :)
>
> However to answer the point raised in a way slightly different to Mervyn is to say that
> return readmodal()
> attempts to pass a boolean variable back in the same way that the stock open() and readModal() functions do.
> The passed variable meaning either success (true) or failure (false) in trying to open the form.
>
> I am therefore guilty of lazy programming because I should have passed on the returned boolean especially
> if this code is put into a base form class which should be as robust as you can make it...
>
> However return readmodal() begs the question of which readModal code is being executed as Mervyn pointed out.
> This question is resolved by the use of the scope resolution operator::
>
> A compact version of my original code would be:
> function readModal
> this.modal = true // set your modal flag
> return super::readModal() // calls the normal dBASE readModal method and returns success/failure
>
> An explicit step by step version of my original code would be:
> function readModal
> local bRtn // establish a return variable
> this.modal = true // set your modal flag
> bRtn = super::readModal() // calls the normal dBASE readModal method and stores the returned boolean
> return bRtn
>
> Hope it helps.
> Andy
>
<snip>
|
|