EDIT: I've looked a bit further and basically what we have is a main "screen" (the viewport) and we render all the other "screens" to the center region (aBody) of it. We choose window instead of panel, for example, to be able to have multiple "screens" opened at the same time, and give the ability to switch between them easily.

where "this" refers to the layout object of the window, to where i'm adding the items, the call "getRenderTarget()" returns undefined. Then tries to access the dom property of undefined, throwing the error i mentioned above.

This is where i'm lost because, as you can see, when i'm creating the window i pass an object (aBody) to the renderTo property.