we actually (at one point in all of our trials) called in 1.1 specifically, and it didn't work.
in upgrading to 1.1, what else do we need to change in our widget?
Specifically you need to change the way your views are structured. In a short nutshell, the biggest changes are the following:
Switch your application loading from this:
CODE
var $app = new KONtx.application.Manager({
sources: {
/* array of various source types */
}
});
to this:
CODE
KONtx.application.init({
views: [
/* array of view declarations */
]
defaultViewId: 'viewId_of_Default_aka_MainView',
settingsViewId: 'viewId_of_your_settings_view'
});
and then restructure your views from this:
CODE
(function (){
var view = $app.getCurrentView();
view.onShow.subscribe(function () {
viewBuilder( this.body.panel );
})
})();
function viewBuilder(container) {
/* code to build view */
}
To this style:
CODE
var MyMainView = new KONtx.class({
ClassName: 'MyMainView',
Extends: KONtx.system.SidebarView,
initView: function() {
// any code you need to happen when the view is first constructed. Consider this to be your class initializer
},
createView: function() {
// any code you need to create the view. this is where the viewBuilder() code from above would live
// instead of using this.body.panel as your container, the default container is now 'this'
},
updateView: function() {
// use this for changing the screen when a user comes back to the same view again
}
});
The majority of our widgets (except Weather and Flickr) are moved over at this point, so you could use them as examples as needed. In general, the Finance, News, and YahooVideo widgets are the most up to date, but that isn't universally the case ( I could also be saying that just because I wrote them, so maybe I am just biased :P ).