Project

General

Profile

TH3-Object Neighborhood

In recent versions of DataFlex you do not have to use the full object path notation when addressing objects.

Eg.

Get Value Of (oMyForm(oGroup(oTabPage1(oTabDialog(Self))))) to sValue

can be written as

Get Value Of oMyForm to sValue

The latter form is much easier to read and does not trigger runtime errors when you move your oMyForm to a location out of the oGroup object.

In DataFlex this is referred to as "Object Neighborhood".

The object neighborhood refactor -which has some overlap with the drop self option- does work very well with any nesting level. But the object has to be defined in the current document. Which is basically a requirement for object neighborhood too.

It does actively check if it can find your object and even verifies if there's another object with the same name as to prevent breakage.
If two objects of the same name exist then it will try to make the object notation shorter, but I think that in most cases it will actually just skip offering to refactor for now as the alternative it will offer is likely to be just as long or longer as the notation you have now.