How to delete a view


I’d like to delete an existant view from a layout’s cell, is it possible?
The must would be that the precedent view automaticaly set active.

I tried “delete tmpLayout.items[1].view(pId)” but it doesn’t work.



If you use in view something, that you can destruct ( have only one form in only one view and you don’t already need it), you can just destruct it and don’t switch to this view anymore.
But i need to specify, what reason to delete it do you have?


in my web app, a menu lists the different views opened. Each view corresponds to an object (for example a customer or a proposal). Each time a user open an object, a view is created and the object is opened inside.
I want to be able to “close” an object, ie delete the corresponding view, to save some memory, and also to be able to reuse an id for a view. For example, the view with id “create_customer” must be opened and closed several time…

Unfortunatelly, there is no such possibility, as “deleting” views.