V14a10

V14a10

A script executed after desktop items have been removed throws nullpointer exception.

_____________

var items = getEvent().getScreen().getCurrentDesktop().getAllItems();

var l_item;

var d =getEvent().getScreen().getCurrentDesktop();

for(var i=items.length-1;i>=0;i–)

{

l_item=items[i];

d.removeItem(l_item);

}

getEvent().getScreen().runScript(“event”,null)

___________

The script “event” only displays an android toast message.

BTW: the desktop consists of items created by script. Executing the same script on the default desktop works. 

]]>
« (Previous Post)
(Next Post) »

10 Commentsto V14a10

  1. Anonymous says:

    < ![CDATA[

    It seems that to trigger the bug there is more needed than removing items, the same script works with a new desktop populated with random items by hand. I believe that the root issue could come from the scripted item creation.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Would be great if you could look into that as scripted items seem to behave differently to manually created.



    E.g. Setting the text color doesn’t work for all scripted items within a scripted container.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Regarding the runScript error, by chance would you be able to capture the log of your device when the null pointer exception message is displayed ? There should be a stack trace that could help me to understand where the problem is.

    ]]>

  4. Anonymous says:

    < ![CDATA[

    working on it. I will send it to you soon.

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Thanks, I am becoming mad about this one!

    ]]>

  6. Anonymous says:

    < ![CDATA[

    That’s not good. Stay calm,we need you. It is only an exception after all 😉

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Lol, don’t worry, I’ll be able to sleep at night 🙂



    Although sometimes solutions come during the night !

    ]]>

  8. Anonymous says:

    < ![CDATA[

    How do I pass the log? via mail? or here to this post?

    ]]>

  9. Anonymous says:

    < ![CDATA[

    log sent

    ]]>

Leave a Reply

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