This duplicates another bug already reported in our system: TOUCH-3689
  1. #1
    Sencha User
    Join Date
    Feb 2011
    Location
    Düsseldorf, Germany
    Posts
    245
    Vote Rating
    4
    Kurt001 is on a distinguished road

      0  

    Default Notification Sencha - Buttons

    Notification Sencha - Buttons


    Notification.PhoneGap shows [object Object] for button

    REQUIRED INFORMATION

    Ext version tested:
    • Sencha Touch 2.1.0 Commertial FINAL
    Browser versions tested against:
    • Android app using Sencha
    Description:
    • Passing OKCancel as the buttons option for Notification.show() causes buttons to display as [object Object]
    Problem:
    • Ext.device.notification.Sencha shows buttons: .../@todo fix this
    Here is a possible fix:
    Code:
    /**
     * @private
     */
    Ext.define('Ext.device.notification.Sencha', {
        extend: 'Ext.device.notification.Abstract',
        requires: ['Ext.device.Communicator'],
    
    
        show: function() {
            var config = this.callParent(arguments),
    	        buttons = [];
    
    
    	    for (i = 0, ln = config.buttons.length; i < ln; i++){
    
    
    		    buttons[i]= config.buttons[i].text;
    	    }
    
    
    	    Ext.device.Communicator.send({
                command: 'Notification#show',
                callbacks: {
                    callback: config.callback
                },
                scope  : config.scope,
                title  : config.title,
                message: config.message,
                buttons: buttons.join(',') //old-->@todo fix this
            });
        },
    
    
        vibrate: function() {
            Ext.device.Communicator.send({
                command: 'Notification#vibrate'
            });
        }
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,641
    Vote Rating
    434
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2012
    Location
    Concord, NC
    Posts
    21
    Vote Rating
    1
    matthewpayne is on a distinguished road

      0  

    Default


    This is still broken in 2.1.1...any ETA?