Object Neighborhoods
DataFlex supports the concept of object neighborhoods, which facilitate communication between objects. Objects within a neighborhood can send messages to other objects in the same neighborhood without needing to know where those objects are declared.
Certain DataFlex classes automatically act as neighborhood containers. All objects nested inside a neighborhood container belong to that container's neighborhood.
Object neighborhoods are analogous to real-life compound objects. For example, a car object is composed of compound objects such as an engine, four doors, a gearbox, and four wheels. We can think of all the sub-objects that make up an engine as belonging to the engine object's neighborhood. This reflects the fact that objects within the engine are often interrelated in ways not necessarily connected to their nesting structure.
A Real-World Example of an Object Neighborhood

In terms of a computer application, the compound objects of an order entry system—such as a customer maintenance view, an order entry view, a print orders view, and so on—are natural candidates for object neighborhoods. For example, a button object might be nested within a group, within a tab page, within a tab dialog, within the customer maintenance view. When clicked, this button may need to send a message to another object. Object neighborhoods allow the button to send the message without needing to worry about the nesting structure of the recipient, as long as the receiving object lies within the same neighborhood.
For more information, refer to Sending Messages Within an Object Neighborhood.