Hi, i’ve got a question: how to check are container exist?
Hi, i’ve got a question: how to check are container exist? It’s very strange, but i can use for example LL.getContainerById(0x999999) and no warning or something…
Hi, i’ve got a question: how to check are container exist? It’s very strange, but i can use for example LL.getContainerById(0x999999) and no warning or something…
Check for null if you’re not sure if a container exists.
So i do:
var exist=LL.getContainerById(0x999999);
if(exist==null){
alert(“Null!!”);
}else{
alert(“Something…”);
}
And…Something!!! What wrong?
Pierre Hébert I consider this broken, please have a look at it
Azariasz Trzciński As a workaround you can check for
container.getType() == “container” && container.getOpener() == null
This is because containers are created on the fly, you can create desktops and folders (or panels) this way.
Well, I don’t think this is documented, and I am not even sure that everything is still working.