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();

]]>

5 Commentsto This script in a load event results in a force close

  1. Anonymous says:

    < ![CDATA[

    Does it happen if you take the item from LL.getEvent().getContainer().getItemByLabel(“”);


    ?

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Yes.

    ]]>

  3. Anonymous says:

    < ![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)

    ]]>

  4. Anonymous says:

    < ![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


    }

    ]]>

  5. Anonymous says:

    < ![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.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *