PDA

View Full Version : ActionSheet reference not working??



WagsMax
13 Feb 2012, 7:48 PM
In Designer, I am using this code, and I am baffled that variable actionSheet remains undefined after stepping over the first line:

var actionSheet = App.app.getController('MainController').getDetailsAction();
Ext.Viewport.add(actionSheet);
actionSheet.show();
elsewhere in the Designer I have defined a controller reference:

Ext.define('App.controller.MainController', { extend: 'Ext.app.Controller',
config: {
refs: {
detailsAction: 'detailsaction'
}, ...
and the definition of the ActionSheet:

Ext.define('App.view.DetailsAction', { extend: 'App.view.ui.DetailsAction',
alias: 'widget.detailsaction',
initialize: function() {
var me = this;
me.callParent(arguments);
}
});
The same type of code works with other controller references/views. Any ideas why this one is not working?

bharatn
14 Feb 2012, 12:08 AM
Do you have instance of detailsaction?