Results 1 to 2 of 2

Thread: Desktop function problem

  1. #1
    Sencha User
    Join Date
    Nov 2008
    Posts
    159

    Default Desktop function problem

    Hello,

    i have next problem: i want call from other place in code - i do it with

    Code:
    MyDesktop.OrdersWindow.prototype.openTranslatorsDetail();
    but i have problem with scope for this function. How i can fix it?

    Code:
    MyDesktop.OrdersWindow = Ext.extend(Ext.app.Module, {
        id:'orders-win',
        init : function(){
            this.launcher = {
                text:'Zlecenia',
                iconCls:'icon-grid',
                handler : this.openDetail,
                scope: this
            };		
        },
    openTranslatorsDetail:function(){	
    				
    	console.log(this);
    	console.log(this.app);
    	console.log(this.app.getDesktop());
    
            var desktop = this.app.getDesktop();
            var win = desktop.getWindow('orders-translators-win');
            if(!win){			
                win = desktop.createWindow({
                    id:'orders-translators-win',
                    title:'Szczeg?y t?umacza',
    				iconCls:'icon-grid',                
    				width:500,
                    height:500,
                    layout:'form',
    				shim:false,
                    animCollapse:true,				
                    constrainHeader:false, 												
    				items:{}
    			})
    		};
    		win.show();
                     ...
    },
    createWindow : function(){		
        var desktop = this.app.getDesktop();
             ...
             ...
       }

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •