Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
152
rated 0 times [  157] [ 5]  / answers: 1 / hits: 24023  / 12 Years ago, thu, july 5, 2012, 12:00:00

In java and C++ we could store a variable globally and access its value from any where in the project.
Say, i am inside a class called Residence and i am saving the residenceNumber which is a INT to a global variable called houseNumberGlobalVariable.



Now, i could access houseNumberGlobalVariable from any class in the project. In a similar fashion, is there a Global variable in EXTJS that i could use.



I need to set a value from one class and access it from another. What is the equivalent in EXT JS. I don't think there's a global variable concept in EXTJS, but what is the equivalent in it ?


More From » extjs

 Answers
3

Just declare a variable in app.js it will act as global variable.



var globalVar;


You can add anything into that like



globalVar.myStore = yourStore;

[#84449] Wednesday, July 4, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
parisc

Total Points: 438
Total Questions: 119
Total Answers: 119

Location: Turkmenistan
Member since Sat, Apr 16, 2022
2 Years ago
;