Sharing data
A common issue in Titanium is that of sharing data between windows. Fortunately, if you follow the few best practices, this need not be a problem for you. The issue usually manifests through a situation where the developer of the app wants to pass some information between two windows, but he/she cannot do it. The other window just doesn't see the information on the first window. What is the problem? It's most likely to be a problem of execution context.
Execution context
When your app starts up, it will create an execution context to execute your code. Don't worry about the term execution context; it's just your little view of the world in which your app runs. When the app first starts there is a single context and so all of your libraries and global data can be seen throughout your app.
Suppose you then create a window using the url
parameter:
Ti.UI.createWindow({ url:'picturePicker.js' });
This will then create a separate context for this window. Nothing from your original context...