PDA

View Full Version : variable reference and namespaces



shizny
2 Jun 2011, 7:54 AM
Probably super simple but I'm having problems with referencing a variable and was wondering if somebody could tell me what is up. In my project I have the typical MVC folder structure. So, in one of my view files I'm trying to name a variable like this

views.FooterMenu = new Ext.Panel(....

and then use it in another view js file. I can't get it to work when I name it with the dot notation but if I name it

FooterMenu = new ....

I can reference the variable from the other js files. Any ideas on this?


Update... I tried using Ext.ns(views) at the top of my js file and still can't reference the variable