You don't have scoping issues, but kind of 'coping with javascript' -issues.
at app.AppView
is stored a Function
-object named AppView
. In javascript functions are used as 'classes' (don't think about Java classes!) in a system called prototype inheritance. Don't get mixed into that yet.
When you call
new app.AppView()
you create a new instance
of this AppView
'class', that IS an object. So when you call
app.AppView.render()
you're trying to call the function render of the 'class' (or class-but-not-quite-a-class). Now that isn't right one bit.
So (like in Java or any other oo-language), you have to store the instance you get by calling the constructor to a variable.
var appView = new app.AppView();
Now that you have an instance, you can do whatever you like with it
appView.render();