[ALOY-530] Creation functions for widgets
|Affected Version/s||Alloy 1.0.0|
|Fix Version/s||Alloy 1.1.0, 2013 Sprint 04|
update (2/22/2013)Widgets will have an object available in controllers that will allow them to execute these functions and get other information about the current widget. Only widget controllers will have this available, non-widget controllers will not have access to this object. The relevant widgetId will be embedded in these calls, so they will have the same signature as the Alloy namespace counterparts. * Widget.createController(name, args) * Widget.createWidget(id, name, args) * Widget.createModel(name, args) * Widget.createCollection(name, args) * Widget.widgetId
originalThe following functions always reference locations relative to the "app" directory: * Alloy.createController() * Alloy.createWidget() * Alloy.createModel() * Alloy.createCollection() These functions are often executed within controllers in widgets. It would be beneficial for developers if these functions references the paths relative to the given widget, rather than those in the app itself which don't really apply to the widget. I'd like to do it transparently without having the developers needs to pass additional information into those functions, but I'll need to investigate further to see if that is possible.