Hard to follow the discussion with scripts and comments scattered on several posts…
If my understanding is correct, the issue is with this line:
var item=LL.getEvent().getContainer().getItemByLabel(labelName);
I don’t believe there is a bug with getItemByLabel or getItemByName. From there, we get two options:
– labelName is wrong
– getContainer() doesn’t give you the expected container
Try to display this container id (something like alert(LL.getEvent().getContainer().getName()); provided that container is a desktop and you previously set its name in the “Configure desktop” screen). You may also loop over the result of LL.getEvent().getContainer().getItems() to see what objects you will get.
LL.getEvent().getContainer() and LL.getEvent().getContainer().getItems() cannot both return null, otherwise the getItems function would cause an error. I am not sure to follow what you are doing exactly…
< ![CDATA[
That’s the name, if you want to use that the script need to have getItemByName instead
The label is under the ‘texte’ tab, click in ‘set label’
(If you want to send more pictures, which is ok, send them directly to me instead on the community, to avoid too much of them)
]]>
< ![CDATA[
TrianguloY not working better with name
Could we discuss on Hangouts ?
]]>
< ![CDATA[
Pierre Hébert so finally not working for me.
Tried some things with TrianguloY but no way
Is it possible to be a bug ?
Logcat or debug possible ?
]]>
< ![CDATA[
Hard to follow the discussion with scripts and comments scattered on several posts…
If my understanding is correct, the issue is with this line:
var item=LL.getEvent().getContainer().getItemByLabel(labelName);
I don’t believe there is a bug with getItemByLabel or getItemByName. From there, we get two options:
– labelName is wrong
– getContainer() doesn’t give you the expected container
Try to display this container id (something like alert(LL.getEvent().getContainer().getName()); provided that container is a desktop and you previously set its name in the “Configure desktop” screen). You may also loop over the result of LL.getEvent().getContainer().getItems() to see what objects you will get.
]]>
< ![CDATA[
Bruno-Isa LAMOUR-ARNOULDIsn’t it because you set the script in the “glissé haut” instead of “resumed event” of the item (seen that in your video)?
]]>
< ![CDATA[
Stahw Down that doesn’t matter.
]]>
< ![CDATA[
Ok sorry 🙁
]]>
< ![CDATA[
Stahw Down don’t worry 🙂 you tried to help and that could be the issue, but I just answered that it isn’t
(Anyway, this is software, it could be. I’m almost sure it is not, but I can’t be 100% sure)
]]>
< ![CDATA[
Pierre Hébert this item line is giving a null value
Trying your alert
]]>
< ![CDATA[
Pierre Hébert your alert gives “null”
GetItems gives null value too
]]>
< ![CDATA[
LL.getEvent().getContainer() and LL.getEvent().getContainer().getItems() cannot both return null, otherwise the getItems function would cause an error. I am not sure to follow what you are doing exactly…
]]>
< ![CDATA[
The first line has an error
Unfortunately I don’t know how to post another screenshot in the same post
I’ve added your 2 lines in the script
The first stopped the script with an error
After that I’ve set it in comment, then 2nd instruction giving null
]]>