add: if (client.viewsArray.length < 2) { client.currentObject.display ("Cannot delete last view.", "ERROR"); return; } 
context: function onDeleteCurrentView(){    var tb = getTBForObject(client.currentObject);        if (tb)    {        var i = deleteToolbutton (tb);        if (i != -1)        {            delete client.currentObject.messages;            if (i >= client.viewsArray.length)                i = client.viewsArray.length - 1;                        setCurrentObject (client.viewsArray[i].source);        }            }    }
meta: 1622	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1622/bee12c37567fda66edb1bcb13eb1a88281bcaed1/handlers.js/buggy/xul/content/handlers.js