1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    31
    Vote Rating
    0
    batman3000 is on a distinguished road

      0  

    Default How to add buffer to keyup event in controller in Architect?

    How to add buffer to keyup event in controller in Architect?


    As per Google, the old way was to add a buffer property to the keyup listener. See below for an example.
    How do I do the equivalent code in a controller and in architect? There's no buffer property in the keyup controller and manually adding one has no effect.

    Code:
    {
                                xtype: 'textfield',
                                itemId: 'description',
                                fieldLabel: 'Description',
                                enableKeyEvents: true,
                                listeners: {
                                    keyup: {
                                        fn: me.onDescriptionKeyup,
                                        buffer: 500,
                                        scope: me
                                    }
                                }
                            },

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Posts
    31
    Vote Rating
    0
    batman3000 is on a distinguished road

      0  

    Default


    Looks like you can't do this in Architect:

    http://www.levihackwith.com/extjs-4-...-this-control/

    Code:
    Ext.define('app.controller.myController', {
        init: function() {
            this.control({
                'form > textfield': {
                    change: {
                        fn: this.textFieldChange,
                        buffer: 500 // Delay the request by half a second
                     }
                }
            })
        },
        textFieldChange: function(textField, newValue, oldValue, options) {
          alert('The text box went from' + oldValue + ' to ' + newValue);
        }
    });

  3. #3
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    Buffer?
    May be a very old config property...
    What is for?

    EDIT:
    Answering other entry I found that buffer is a property of the event when attached to the component:

    Selection_001.png
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Posts
    31
    Vote Rating
    0
    batman3000 is on a distinguished road

      0  

    Default


    The issue of whether or not it's an old property is irrelevant. You should be able to pass options to controller listeners (which you can do in ExtJS). It looks like a feature that Architect is currently lacking (bug?).

  5. #5
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    Not a bug but a limitation.
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar