Probably getId() will return a value above 100, is this correct ? Could it be that you set the event on a panel (or folder?), but try to reach the item in a container somewhere else ?
No getName() function on the container means this container is not a desktop. The “glissé haut” event has been triggered on a panel or a folder, not on the desktop. Add shortcut to the script in the desktop, and try it, the result will be different.
A container with the id=-1 is the one lightning use when launching from a ‘global’ shortcut, like home button, two fingers swipe, back button…
I tested it…and it is true! It is a bug Pierre Hébert, swipe gestures on a desktop (not tested in other containers) don’t have the container attached in the event, they have the -1 container
Bruno-Isa LAMOUR-ARNOULD the script should work in the resumed event of the app drawer with the label, name, and id. Just set it, don’t test with the swipe.
But…with the id it should work also in that event…and you said it didn’t work…so…no idea.
In fact there are two issues: firstly all swipe events use a “special” context, and the container is always reset, secondly a container with id -1 should never exists (other container can be dynamically allocated, but -1 is a reserved value).
I will fix this asap, thanks for discovering this and sorry for the trouble!
< ![CDATA[
I think there is really an issue where looking for Container
Your Line : alert(LL.getEvent().getContainer().getName());
]]>
< ![CDATA[
So this is not a desktop, this is either a panel or a folder
(see http://www.pierrox.net/android/applications/lightning_launcher/script/reference/net/pierrox/lightning_launcher/script/api/Container.html and http://www.pierrox.net/android/applications/lightning_launcher/script/reference/net/pierrox/lightning_launcher/script/api/Desktop.html)
Probably getId() will return a value above 100, is this correct ? Could it be that you set the event on a panel (or folder?), but try to reach the item in a container somewhere else ?
]]>
< ![CDATA[
The item is a shortcut on the desktop
And testing with a script set with “Glissé haut”
]]>
< ![CDATA[
No getName() function on the container means this container is not a desktop. The “glissé haut” event has been triggered on a panel or a folder, not on the desktop. Add shortcut to the script in the desktop, and try it, the result will be different.
]]>
< ![CDATA[
Pierre Hébert sorry I don’t understand
How to add shortcut to the script ?
The “glissé haut” having event is launching the script
]]>
< ![CDATA[
Must I add a panel for my desktop and how to do it ?
]]>
< ![CDATA[
Pierre Hébert ok much better when set on the shortcut directly.
Is it possible to used Resumed ?
]]>
< ![CDATA[
Wait a moment
A container with the id=-1 is the one lightning use when launching from a ‘global’ shortcut, like home button, two fingers swipe, back button…
I tested it…and it is true! It is a bug Pierre Hébert, swipe gestures on a desktop (not tested in other containers) don’t have the container attached in the event, they have the -1 container
]]>
< ![CDATA[
Bruno-Isa LAMOUR-ARNOULD the script should work in the resumed event of the app drawer with the label, name, and id. Just set it, don’t test with the swipe.
But…with the id it should work also in that event…and you said it didn’t work…so…no idea.
(Anyway, that bug is now found)
]]>
< ![CDATA[
TrianguloY ok rechecked with Resumed and working now
Issue was the test in order to run only once a day so not running after the first run
But not working for appdrawer only with shortcut on desktop
]]>
< ![CDATA[
In fact there are two issues: firstly all swipe events use a “special” context, and the container is always reset, secondly a container with id -1 should never exists (other container can be dynamically allocated, but -1 is a reserved value).
I will fix this asap, thanks for discovering this and sorry for the trouble!
]]>
< ![CDATA[
I’m now managing with direct ItemById so no more issue for me
]]>