1. #1
    Ext JS Premium Member Elijah's Avatar
    Join Date
    Nov 2009
    Location
    USA
    Posts
    382
    Vote Rating
    0
    Elijah is on a distinguished road

      0  

    Question Help me call a method please.

    Help me call a method please.


    Below is a portion of code I have in the desktop example files. The problem is that this.createWindow1 does not execute.

    Can someone tell me why it wont execute when I click on View alerts in the menu?


    Code:
    MyDesktop.BogusMenuModule = Ext.extend(MyDesktop.RssFeedViewer, {
        init : function(){
            this.launcher = {
                text: 'Alerting System',
                iconCls: 'bogus',
                handler: function() {
                    return false;
                },
                menu: {
                    items:[{
                            text: 'View alerts',
                            iconCls:'bogus',
                            handler : this.createWindow1,
                            scope: this
                        }
                    ]
                } // menu
            } // launcher
    
            this.createWindow1 = function(){
                Ext.Msg.alert('called createWindow1');
    Thank you for looking.

  2. #2
    Ext JS Premium Member Elijah's Avatar
    Join Date
    Nov 2009
    Location
    USA
    Posts
    382
    Vote Rating
    0
    Elijah is on a distinguished road

      0  

    Default


    My fault. Bad layout. Should have been.
    Code:
        init : function(){
            this.launcher = {
                text: 'Alerts',
                iconCls:'bogus',
                handler: function() {
                    Ext.Msg.alert('do nothing');
                    return false;
                },
                scope: this,
                windowId:windowIndex,
                menu: {
                    items:[{
                            text: 'View alerts',
                            iconCls:'bogus',
                            handler : this.createWindow1,
                            scope: this
                        }
                    ]
                } // menu
            } // launcher
        }, // init
    
        createWindow1 : function(){
            Ext.Msg.alert('called createWindow1');
    ...

  3. #3
    Ext User
    Join Date
    Aug 2009
    Posts
    588
    Vote Rating
    1
    Mike Robinson is on a distinguished road

      0  

    Default


    "Bad layout! Bad dog! No biscuit!!"

    It happens. Especially on Mondays.

Thread Participants: 1