showView with several windows

Hello.

If I use following code with single dhtmlx window, it works fine:

var toolb;
function showView(view,code) {

	var firstShow = tabbarMatObj.cells("str").showView(view);
	
	// view became visible first time, loading content
	if (firstShow) {
	
		if (view == "details") {
			 toolb = tabbarMatObj.cells("str").attachToolbar();
			 toolb.setIconsPath('skins/imgs/');
			 toolb.addButton("new_p", 0, "Back", "", "");
			 toolb.attachEvent("onClick", function(id) {
			    if(id=="new_p") { showView("def"); }				    	
			    });

		}
		
	}
}

But if I open several windows it works correctly only with last opened window.

Wich solution do you recommend to use? May be way something like:

var firstShow = win.window(win.getId()).tabbarMatObj.cells(“str”).showView(view);

The last does not work

Hello
Could you privide us completed demo? We need to see the ligic of your window’s usage
docs.dhtmlx.com/auxiliary_docs__ … pport.html