14.1.1
14.1.1
Getwidth or getcellwidth return 0 on items that have been retrieved via script.
E.g
var selitem = getEvent().getScreen().getCurrentDesktop().getItemByName(“container”).getContainer().getItemByName(tag);
var folder=selitem.getContainer();
Folder.getwidth() returns 0 where it didn’t before
The container itself is a valid object and not null as it seems.
Using getEvent().getContainer() seems to work on the other hand which I have no idea why.
Pierre Hébert
]]>« Hello (Previous Post)
(Next Post) Anybody care to tell me how to display an image of my album cover? Or an image in general? »
< ![CDATA[
I think it is because the folder is empty.
]]>
< ![CDATA[
The folder contains elements.
And, the same command didn’t return 0 when executed with 14.1 instead of 14.1.1.
]]>
< ![CDATA[
I don’t think this bug is specific to 14.1.1. Maybe there’s a timing issue somewhere and for some reason it wasn’t visible in 14.1, although present, because it works for me on both a phone and emulator (the headline changes from tools to exercises when swiping, and fwidth has a valid value in the vscrolling script).
That’s only a supposition though. Another possibility is that getScreen() wouldn’t return the right screen. That would explain a 0 width, but I don’t know how it would happen.
Regarding the other bug for which you sent me backup, I’ll publish an update son.
]]>
< ![CDATA[
Thx Pierre.
The other script bug is fixed.
The folder width bug seems to be related to deleting desktops.
When I go to “configure desktops” there is a null pointer exception.
Deleting the sample lockscreen crashes LL, as reported somewhere else already
After some force closes and a phone restart, the vscrolling does work again as expected.
Not sure what the root cause is. But I will stay away from deleting any desktop for now.
Additionally, when I execute the “revert setup” script, the bug with 0 folder width is back again. (wasn’t the case before 14.1.1)
Force closing LL makes it work again.
]]>
< ![CDATA[
Thanks for these hints. It doesn’t seem to be an easy bug 🙁 But with these indications and your backup I will certainly be able to reproduce and fix it.
]]>
< ![CDATA[
Pierre,
Is this bug fixed with the latest beta you just released?
Thanks for an update in advance.
]]>
< ![CDATA[
It’s an old post, I’m not sure to remember correctly. Either I couldn’t reproduce it, or it has been fixed.
]]>
< ![CDATA[
Seems to be fixed. Cheers.
]]>