This script in a load event results in a force close
This script in a load event results in a force close
var i=LL.getItemById(0x060020);
i.open();
]]>
< ![CDATA[
Does it happen if you take the item from LL.getEvent().getContainer().getItemByLabel(“”);
?
]]>
< ![CDATA[
Yes.
]]>
< ![CDATA[
So I guess that when the container is loaded the folder is not yet. I think it happen the same if you try to launch a shortcut…not sure.
Perhaps Pierre can make that event to run when all the container is fully loaded in memory….(it will also fix the getWidth() problem I guess)
]]>
< ![CDATA[
As I understood Pierre Hébert it is not possible to detect when everything is loaded.
For the getWidth problem:
f();
function f()
if(container.getWidth()==0)
{
SetTimeout(f,50);
return;
}
//do Something
}
]]>
< ![CDATA[
In this context it may be that some folder related structure is not ready yet, but maybe the order of operations can be reversed. I will have a look at this but only in a few days as I am not at home.
Regarding the size this is annoying. In a native android app you get events when views are resized but this is not a solution to add yet another event like this to scripts . I will experiment a few things and let you know.
]]>