I made a text editor in Flex that only allows you to work on one text file at a time. I want to redo it as a Blackberry WebWorks app that allows you to have multiple files open simultaneously allowing the user to switch between the open files via the action bar. I can get my head around opening a single file but not sure if/how I can do this for multiple files.
In Flex I know how to pass data between screens but what about javascript?
It depends on how you design your app. If you follow MVC pattern, you could have a single HTML file, and use JavaScript to load in/out content for different “screens” (e.g. jQuery Mobile makes this easy). In that case, you could easily share data between these screens using a global JavaScript variable (recommend a module containing variables) or some form of localStorage.
Otherwise, if you are using separate HTTP requests to load content from different HTML files, then you would need to save the state/model to localStorage first.