titanium - How to reference a variable inside an exports function? -


Newbie Question: I have a bunch of variables defined within the export function, for example:

  

code> Miscellaneous movies; Function Tabs (Window) {// Create Module Example itself = Ti.UI.createTabGroup ({activeTabIconTint: '# F4CA53', tabsBackgroundColor: '# 000000'}); Movies = Ti.UI.createTableView ({Data: MovieData,}); Self return; } Module.exports = Tab;

Then in another JS file, which is included in the scope, I am trying to reference that the movie variable (tableview) I have tried various things and nothing works:

  movies.setData (movieData); Tabs.movies.setData (movieData);  

How can I update the "data" property of "Movies" tableview when I'm out of the "tab" function?

Can not you just pass it in tab function?

  function tab (window, moviedata) {// create module instance Var self = Ti.UI.createTabGroup ({activeTabIconTint: '# F4CA53', Tabbackgram Collar: '# 000000'}); Movies = Ti.UI.createTableView ({Data: MovieData,}); Self return; } Module.exports = Tab; // Call it like: Tab (window, movie data);  

Comments