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.
]]>
< ![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.
]]>
< ![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.
]]>
< ![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.
]]>
< ![CDATA[
working on it. I will send it to you soon.
]]>
< ![CDATA[
Thanks, I am becoming mad about this one!
]]>
< ![CDATA[
That’s not good. Stay calm,we need you. It is only an exception after all 😉
]]>
< ![CDATA[
Lol, don’t worry, I’ll be able to sleep at night 🙂
Although sometimes solutions come during the night !
]]>
< ![CDATA[
How do I pass the log? via mail? or here to this post?
]]>
< ![CDATA[
Yes please, at pierrox@pierrox.net
]]>
< ![CDATA[
log sent
]]>