Saturday, September 21, 2013

Weather Widget

Since the last time I posted on here, the weather widget has gone through two complete code overhauls.  It will most likely go through a third, after we figure out a way other than using the SDKs panel and widget. As of right now the widget allows the user to switch between the normal and edit views, add cities, delete cities, and make a city the current location by clicking the star. It does not allow cities without names, conflicting cities, etc. I have started to add in the simple-preferences, although it's a little more challenging to keep the code clean when having to send messages between the main.js and other script files. This is because, as of now, the cities are objects that are contained in an array that is a member of a cityManager object. I will more than likely have to make the city objects use the cityManager as a mediator to communicate with the simple-prefs. This also is needed when dealing with the multiple API calls for multiple cities. It would be nice to be able to make API calls directly from the city objects, but alas it doesn't seem possible.

No comments:

Post a Comment