I guess you’re struggling with how property names and component names work.
The syntax ‘.parent’ doesn’t reference a component named ‘parent’, it references the container of the object it is applied to. It’s a built-in property that corresponds to java Components’ getParent() method. In an event routine, ‘event.source’ is the component that fired the event. ‘event.source.parent’ is the container of that component. Containers are components that hold other components and therefore have additional methods to iterate, search or otherwise reference their children. One of those is the .getComponent(someString) that will search through the children looking for the first one that has that name. In your example with a child named ‘child’, you must use .getComponent(“child”) from its container. .child won’t work.
So Ignition’s components sit within containers, which are themselves components within other containers. The root Container is held within a window, not a container. Windows do have .getParent() methods, though, and the hierarchy goes all the way “up” to the application window itself. Windows also have .getRootContainer() methods, which can be abbreviated as .rootContainer for your convenience. If you’d like an example of traversing through all object parents, look at my script in this topic.
Templates add a bit of extra complexity, as there are undocumented component layers between one of the template holders and the template instance itself. Traversing all parents from a script on a button inside a template will give you a look at all of them.
Side note: the abbreviation system is largely built-in to jython, following NetBeans getter/setter naming conventions. Ignition extends this system to include custom properties in most places.