The main application window
Our main application window will be comprised of a progress bar that will indicate how far we are from our objective. This same progress bar will have a label on each end to indicate the minimum and maximum value. There will also be a much larger label right at the center of the window which will serve as the recommendation (whether to hold on to our stock or sell it).
Finally, there will be buttons on each window's bottom-corners, one to access the portfolio management window and a second one to refresh the stocks by retrieving their latest selling price online:
Moving on to the code
As mentioned earlier, our main application window will be contained in its very own JavaScript file. So, in Titanium Studio, we will create a new file by navigating to the File | New | File menu. We will name it ApplicationWindow.js
and it will be located in the Resources/ui
directory.
In order to be able to load the application window, we need to define a function that will return our...