Subject Re: Closing an image on a form
From Mervyn Bick <invalid@invalid.invalid>
Date Fri, 9 Apr 2021 09:53:18 +0200
Newsgroups dbase.getting-started

On 2021/04/09 08:33, roy price wrote:

> Thanks for your help
> I'm setting up a test directory with the minimal  number of files to get the navigation to the three image files to work.
> However, I don't understand where to add this.....
>    " In the following event handler for
>> form.cactusadatamodule1.cactusaa_dbf1.rowset
>>
>>       this is form.cactusadatamodule1.cactusaa_dbf1.rowset
>>       this.parent is form.cactusadatamodule1.cactusaa_dbf1
>>       this.parent.parent is form.cactusadatamodule1
>>       this.parent.parent.parent is form"


This was simply an explanation on the usage of "this.parent....." in the
code for the event handler which was to follow further down the page.
It was meant to help you keep track of "Who's my Daddy" in the code.

Coming across "this.parent.parent.parent.imagephoto02.datasource = []"
in unfamiliar code can be daunting until one reconises that it is simply
a variation on the more familiar "form.imagephoto02.datasource = []".

Each "parent" represents an object in the chain and the comment was to
help decipher "this.parent.parent.parent.imagephoto02.datasource = []"
when you came across it in the actual example code.


> As an aside I was a constant user of dbase in the 1990's-2000's. But having been retired long since, I struggle to remember what I have forgotten.

Join the club. I've been retired for 20 years.  In another five I'll
qualify for my second "Long service" award. :-)

>   (I hope Pakistan bowlers don't use sandpaper!)
>

Unlike Australia, the Pakistani bowlers didn't need to resort to
underhand methods to beat South Africa. :-)

Mervyn.