code: function buildFrameTree(frame) {
  	var tree = {
  		name : frame.getParamValue("tabname") || "mira.frame (" + frame.id + ")",
  		children : []
  	};
  
  	frame.getObjects().forEach(function(obj) {
  		tree.children.push({
  			name : obj.type + "(" + obj.id + ")"
  		});
  	});
  
  	return tree;
  }
docs: StateTree helpers