var searchGridWin= this.getUserSearchGridView();
this.searchGridWin = Ext.widget('searchGrid'); the first retuns a function and the later returns an object....i want to use the first way to do something like

searchGridWin.show(); rather this.searchGridWin.show()//when using the second method;

tvanzoelen

3 Sep 2012, 1:23 AM

The first returns the class if it was registered in the views section of the controller. then that function is available.

Ext.widget will allways return an instance of the specific class, if it is loaded within the scripts.

controller
Ext.define('AM.controller.Users', {
extend: 'Ext.app.Controller',
views:[
'user.List','user.Edit','user.West','user.Tabview','user.ReportTree','user.SearchGrid',
],
stores:[
'Users','Policies','SearchGrids',
],................. the view is registered. but the problem is when i tried to make the view show up

var searchGridWin= new this.getUserSearchGridView() searchGridWin.show();is not working ....on firebug searchGridWin is an empty function

controller
Ext.define('AM.controller.Users', {
extend: 'Ext.app.Controller',
views:[
'user.List','user.Edit','user.West','user.Tabview','user.ReportTree','user.SearchGrid',
],
stores:[
'Users','Policies','SearchGrids',
],................. the view is registered. but the problem is when i tried to make the view show up

var searchGridWin= new this.getUserSearchGridView() ;is not working ....on firebug searchGridWin is an empty function