V14a11
V14a11
Editing properties of script-created items prevents other later scripted edits to work.
E.g. The color of items can’t be set via script once the item has been styled initially (accessing the properties seems to be enough already) via script before the color change is applied.
The color change works (without any code change) if no styling via script happened at the time the item was created.
]]>
< ![CDATA[
I am unable to reproduce this bug, although I saw it a few times in a row π I restarted the app, since then I can’t get the bug anymore.
What I’ve seen is that the color property was saved but not displayed. Did you notice the same thing?
Here is the script I use:
var p=LL.getCurrentDesktop().addPanel(0,200,500,390);
p.getProperties().edit().setBoolean(“i.rotate”,true).commit();
var i=p.getContainer().addShortcut(“test”,new Intent(),1,1);
i.getProperties().edit().setBoolean(“i.rotate”,true).commit();
i.getProperties().edit().setInteger(“s.labelFontColor”,0xff0000ff).commit();
I tried various combinations, moved the lines in different orders, but no luck, it doesn’t fail anymore. Do you have any other hint ?
]]>
< ![CDATA[
not sure of that helps, but the creation of the item and the styling happen in different scripts.
]]>
< ![CDATA[
Yes it may help. Is one of these scripts run in background, or started by the runScript() call ?
]]>
< ![CDATA[
It is run via runScript.
Not sure how to start scripts in background tbh. How do I know?
]]>
< ![CDATA[
Most (if not all) background scripts are started by an external app, such as Tasker. In this case it is possible to select the screen on which the script should act.
Usually the screen is the one in which the event occurred.
]]>
< ![CDATA[
ah, ok, so then I dont have scripts run in background as I dont use any other program than LL π
]]>
< ![CDATA[
Thanks
]]>