Controls are not created until its parent window is activated, so method 'hide' can't be invoked.Your OOP code is very elegant and very simple and yet very powerful. You have established the base class of the controls for which all controls can inherit. I tried to experiment with your sample. I modified Test1 and added grid on it.
To overcome this, you'll must explicity create the window and the control prior to the window activation using the 'create()' method available for windows and controls.