Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    548
    Vote Rating
    18
    estesbubba will become famous soon enough

      0  

    Default store load event being called twice

    store load event being called twice


    Sorry, don't have time right now to make test case (others are waiting on Beta 1 to be running) but here is my code snippet. With Beta 1 my load event is now getting called twice.

    Code:
            Ext.create('Ext.data.Store', {
                fields: [],
                autoLoad: true,
    //            mask: me.getApplication().mask,
                proxy: {
                    type: 'ajax',
                    url: 'kioskInitialization!pickDevicesInformation.action',
                    reader: {
                        type: 'json',
                        rootProperty: 'data.initializationData.kioskNames'
                    }
                },
                listeners: {
                    load: function(store, records, success) {
                        var devices = [];
    
    
                        // Hack for load getting called twice
                        if (this.getPickDevices()) {
                            return;
                        }
    
    
                        Ext.each(records, function(record) {
                            devices.push({
                                text: record.raw,
                                value: record.raw
                            })
                        }, me);
                        var comp = Ext.create('Csg.view.PickDevices', {
                            devices: devices
                        });
                        comp.show();
                    },
                    scope: this
                }
            });

  2. #2
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Thank you for the report.

    Sencha Inc

    Jamie Avins

    @jamieavins

  3. #3
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    548
    Vote Rating
    18
    estesbubba will become famous soon enough

      0  

    Default


    We you able to reproduce it? I'm swamped right now and don't know when I'll have time to make a test case if you haven't.

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    9
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    Hi estes,

    I have not been able to reproduce this bug. When running the following code, the console.log message correctly shows only once.

    Code:
            Ext.setup({
                onReady: function() {
                    Ext.create('Ext.data.Store', {
                        fields: [
                            'field1'
                        ],
                        proxy: {
                            type: 'ajax',
                            url: 'read.json',
                            reader: {
                                type: 'json',
                                rootProperty: 'results'
                            }
                        },
                        autoLoad: true,
                        listeners: {
                            load: function(store, records, success) {
                                console.log('load event fired', records);
                            },
                            scope: this
                        }
                    });
                }
            });
    It would be great if you could provide a bit more information on how we can recreate this bug.

  5. #5
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    548
    Vote Rating
    18
    estesbubba will become famous soon enough

      0  

    Default


    So here is the story. In PR3 we had launch() in a controller that would get called automatically by the framework. This was removed in PR4 so our application fired an event and that controller would call the launch() method when fired. Now in B1 it appears that the framework calls launch in controllers again and our application was fired an event, so that function was getting called twice.

    In short, I've found out this isn't a bug.

    One big problem we have ran into is posted here (and not currently marked as a bug):

    http://www.sencha.com/forum/showthre...erent-codebase

  6. #6
    Sencha User
    Join Date
    Jun 2007
    Posts
    260
    Vote Rating
    4
    hallikpapa is on a distinguished road

      0  

    Default


    I have this exact same problem, specified here:

    http://www.sencha.com/forum/showthre...ly-called-once