Hi,
Closing tabbar page I’m releasing objects from memory . Source :
mainTab.attachEvent( "onTabClose", function( id )
{
var tabr = mainTab.cells( id ).getView().tabbar;
if ( tabr != null )
{
var arr = tabr.getAllTabs();
for ( var u = arr.length - 1; u = 0; u -- )
{
var grd = tabr.cells( arr[ u ] ).getView().grid;
var tlb = tabr.cells( arr[ u ] ).getView().toolbar;
if ( tlb != null )
{
tlb.unload();
tlb = null;
}
if ( grd != null )
{
grd.destructor();
grd = null;
}
}
tabr.clearAll();
tabr = null;
}
var grid = mainTab.cells( id ).getView().grid;
if ( grid != null )
{
debugger;
grid.clearAll( true );
grid.destructor();
grid = null;
}
var tlbr = mainTab.cells( id ).getView().toolbar;
if ( tlbr != null )
{
tlbr.clearAll();
tlbr = null;
}
return true;
});
It return error from dhtmlx.js 562 line : if (this.vs[this.av].grid){this.vs[this.av].grid.setSizes();}
Error : Uncaught TypeError: Property ‘setSizes’ of object # is not a function
As you can see in code , Chrome JS console debugger stops , I can see that grid object become null ( 1 png image ) . But in the 2 image , you can see that grid object is not nulled and it return error . How to fix that ?
Also I want to notice , that other tab pages can get tabbars . Then release inside other tabbar of toolbars and grids works fine, without problems . It falls only in the main tabbar …