Ext


Go Back   Ext JS Forums > Ext JS Community Forums (3.0) > Ext: Bugs

Reply
 
Thread Tools
  #1  
Old 08-06-2009, 05:34 PM
Allan Allan is offline
Ext JS Premium Member
 
Join Date: Jan 2008
Posts: 55
Allan is on a distinguished road
Default [CLOSED][3.0.0] this.swf.setDataProvider is not a function

Ext version tested:
  • Ext 3.0.0

Adapter used:
  • ext

css used:
  • only default ext-all.css



Browser versions tested against:
  • FF 3.0.13

Operating System:
  • WinXP Pro

Description:
  • this.swf.setDataProvider is not a function is reported by Firebug as when emptying the store connected to a deleted chart

Test Case:

Change examples/charts/charts.js to this:

 /*!
 * Ext JS Library 3.0.0
 * Copyright(c) 2006-2009 Ext JS, LLC
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
Ext.chart.Chart.CHART_URL = '../../resources/charts.swf';

Ext.onReady(function(){

    var store = new Ext.data.JsonStore({
        fields:['name', 'visits', 'views'],
        data: [
            {name:'Jul 07', visits: 245000, views: 3000000},
            {name:'Aug 07', visits: 240000, views: 3500000},
            {name:'Sep 07', visits: 355000, views: 4000000},
            {name:'Oct 07', visits: 375000, views: 4200000},
            {name:'Nov 07', visits: 490000, views: 4500000},
            {name:'Dec 07', visits: 495000, views: 5800000},
            {name:'Jan 08', visits: 520000, views: 6000000},
            {name:'Feb 08', visits: 620000, views: 7500000}
        ]
    });

    // extra extra simple
    var window = new Ext.Window({
        title: 'ExtJS.com Visits Trend, 2007/2008 (No styling)',
        renderTo: 'container',
        width:500,
        height:300,
        x: 100,
        y: 100,
        layout:'fit',
        items: {
            xtype: 'linechart',
            store: store,
            xField: 'name',
            yField: 'visits',
			      listeners: {
				    itemclick: function(o){
					    var rec = store.getAt(o.index);
					    Ext.example.msg('Item Selected', 'You chose {0}.', rec.get('name'));
				    }
			    }
        }
    });
    window.show();

    new Ext.Button({
      text: 'Press me after closing the window',
      renderTo: 'container',
      handler: function(b,e) {
        store.removeAll();
      }
    });
});
[
Steps to reproduce the problem:
  • Close the window
  • Press the button

The result that was expected:
  • No error message from Firebug

The result that occurs instead:
  • Firebug traps the error this.swf.setDataProvider is not a function

Debugging already done:
  • none

Possible fix:
  • Check that window destroys chart components correctly

    Actually I don't think that the 'clear' event listener is being removed when the SWF object is destroyed.

Last edited by Allan; 08-06-2009 at 05:59 PM.. Reason: Update possible fix
Reply With Quote
  #2  
Old 08-07-2009, 02:57 AM
evant's Avatar
evant evant is offline
Ext JS - Development Team
 
Join Date: Apr 2007
Location: Sydney, Australia
Posts: 8,200
evant is on a distinguished road
Default

This is already fixed in SVN, the chart wasn't unbinding itself from the store on destruction. You might want to grab the latest from the trunk. Marking this one as closed.
__________________
Evan Trimboli
Ext JS - Core Development Team
evan@extjs.com
Reply With Quote
  #3  
Old 08-21-2009, 07:44 PM
bugsbunny bugsbunny is offline
Ext User
 
Join Date: May 2009
Posts: 11
bugsbunny is on a distinguished road
Default Can you provide where is the fix exactly located

Can you provide where is the fix exactly located in the SVN like the method name..I dont want the whole code to be replaced


Thanks
Reply With Quote
  #4  
Old 08-22-2009, 10:10 AM
mjlecomte mjlecomte is offline
Ext JS - Quality Assurance Team
 
Join Date: Jul 2007
Location: Florida
Posts: 9,996
mjlecomte is on a distinguished road
Default

Did you try checking rev 3317 and 4665?
Reply With Quote
  #5  
Old 11-05-2009, 06:18 AM
omermx omermx is offline
Ext User
 
Join Date: Jul 2009
Posts: 36
omermx is on a distinguished road
Default

Hi, How/where can I download this fix?
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 04:11 PM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.