Welcome to Omgili,
Omgili ( Oh My God I Love It ;) is a search engine for discussions. With Omgili you can find answers and solutions, debates, discussions, personal experiences, opinions and more... To learn more about Omgili click here.
This is a complete preview of the discussion as it was indexed by Omgili crawlers. Use this preview if the original discussion is unavailable.
Click here to view the original discussion.
 |
|
 |
|
Problem closing window with chart IE - Ext JS Forums
I am using IE8. When ever I display a chart in a window, it errors on closing of the window with the following error:
Line: 1 Error: 'null' is null or not an object
This doesn't happen in FF3.
I am posting the following example that can be run to demonstrate the problem.
I have seen this problem in 3.0 RC1.1 & 3.0 RC2.
var data = [['Ext JS', 115000], ['jQuery', 250100], ['Prototype', 150000], ['mootools', 75000], ['YUI', 95000], ['Dojo', 20000], ['Sizzle', 15000]];
Var store = new Ext.data.ArrayStore({ fields: [{ name: 'framework' }, { name: 'users', type: 'float' }] });
Store.loadData(data);
Var pieChart = new Ext.chart.PieChart({ store: store, url: 'ext-3.0-rc2/resources/charts.swf', dataField: 'users' // <-- this is very important!!
}); var win = new Ext.Window({ title: 'Pie chart example', width: 450, height: 300, bodyStyle: 'background-color:#fff', items: [pieChart] });
Win.show();
Any help is greatly appreciated.
|
|
 |
|
 |
 |
|
 |
|
I've got the same problem.
Hope somebody help us!
|
|
 |
|
 |
 |
|
 |
|
Having the same problem.
When I try to close the window it gives nearly the same error.
But nothing in FF.
Hope somebody helps.
|
|
 |
|
 |
 |
|
 |
|
Not a solution but passed the problem with windows closeAction parameter.
I set it to "hide" rather than "close" and now works.
But stays in browser cache and using resources.
I think it is about destroying the flash component.
Because same window with no chart doesn't act like the same.
|
|
 |
|
 |
 |
|
 |
|
This problem has already been solved in SVN.
Try this patch:
Ext.override(Ext.chart.Chart, { onDestroy: function(){ Ext.chart.Chart.superclass.onDestroy.call(this);
This.bindStore(null);
Var tip = this.tipFnName;
If(!Ext.isEmpty(tip)){ delete window[tip];
} } });
|
|
 |
|
 |
 |
|
 |
|
Thank you for all the help on this issue.
This overide worked great for the pie chart.
Didn't solve it for my column chart but after a little debugging I found that the tip part of the overide was the problem I altered the overide and now it works for all my charts.
Ext.override(Ext.chart.Chart, { onDestroy: function (){ Ext.chart.Chart.superclass.onDestroy.call( this );
This .bindStore( null );
//var tip = this.tipFnName;
//if(!Ext.isEmpty(tip)){ // delete window[tip];
//} } });
|
|
 |
|
 |
 |
|
 |
|
@supercharge2
I don't understand, why is the problem solved when you comment some lines from the codes?
@all
Can anyone confirm that the problem is solved for all diagrams??
|
|
 |
|
 |
 |
|
 |
|
This fix doesn't work in IE because IE doesn't allow window members to be deleted with delete keyword, even those added by the developer, which is dull (like everything in IE).
You can try something as simple as this:
window.mymember = "hello";
Delete window.mymember;
You'll get an error.
|
|
 |
|
 |
 |
|
 |
|
Quote: : @supercharge2
I don't understand, why is the problem solved when you comment some lines from the codes?
@all
Can anyone confirm that the problem is solved for all diagrams??
Works for me in IE, I have had no more problems since that code addition.
I am running the charts in portal widgets that can dynamically be added and closed, so this was a major problem for me, as it threw an error every time a widget was closed.
I am currently running Ext 3.0.0, IE 8, Firefox 3.5.3.
|
|
 |
|
 |
 |
|
 |
|
Quote: : This problem has already been solved in SVN.
Try this patch:
Ext.override(Ext.chart.Chart, { onDestroy: function(){ Ext.chart.Chart.superclass.onDestroy.call(this);
This.bindStore(null);
Var tip = this.tipFnName;
If(!Ext.isEmpty(tip)){ delete window[tip];
} } });
Thank you for this.
I spent all morning trying to get chart panels to remove from IE.
This override made the panels remove as expected.
|
|
 |
|
 |
|
|
|