June, 2014
now browsing by month
I’m not sure if this wasn’t reported before, correct me if I’m wrong.
Anyway, why the setRotation and getRotation methods of items use int? Why not float? You can set floats with the geometry editor, and they get saved so I guess internally they are floats.
So, why from script they are cutted into ints?
]]>I use muzei live wallpapers and it doesn’t show up in the LLX background menu.
Please add possibility to import and export scripts as JS-files.
This comes handy also for backing up between edits. Sometimes I have that nasty bug the editor (I use Quora) does not load properly and after removing the edito from “last apps” list the script is empty — read: lost!
]]>Hello all you script-maniacs, here’s a demo and description of some issues I am still stumbling upon.
I don’t know wether these are bugs or intended (though unexpected) behaviours — if so, how to do it right?
Problems:
(1) Collapsing panels to 0px height
(2) Changing properties of items inside a panel not persistent
Collapsing to 0px – Intro
I want to collapse a panel to 0px height by script.
This requires
– panel dettached from grid — obviously
– rows set to NUM, not ROWS
– FitDesktopToItems = false
Collapsing to 0px – Issue 1
If FitDesktopToItems is “true” (what’s the preferable setting), instead of shrinking to 0px the panel is sized to a height which is, well, fit to the height of all items included.
Collapsing to 0px – Issue 2
If FitDesktopToItems is “false”, the panel is shrunk… but only if there aren’t any paddings, margins or borders at top or bottom! Otherwise instead of 0px the panel’s height is the sum of all top plus bottom paddings, margins and borders.
My current very ugly workaround is setting to 1px (which works good, with only a few border’s pixels remaining left and right) and changing Visibility to false.
Changing item properties
If I change properties of items inside a panel via script (like transparency, color, bold/italic/normal), it seems to work… but only until properties of the panel are changed. Or better: even edit()/commit() without changing anything is executed. Doing so causes the item’s properties to revert to their previous values; not default (think: inheritance). They seem to be “persisted” however after a while, a restart of LL, … I don’t know…
I tried starting “edit()” of the panel item and/or container before changing the item’s properties and commit() afterwards, but this did not help. IIRC it immediately causes reverting.
Am I doing something wrong or is this a bug?
DEMO Template
Here’s a template with the demo screen and scripts.
https://app.box.com/LL20140617Demo
Functions:
– “Mark items” (_script1): toggles transparency of the items inside the panel
– “Edit panel” (_script2):
– Answering “Change panel properties” with “Cancel” only does edit().commit() for container (this commit reverts the item changes) and item (this does not)
– “OK” allows to change some properties: RowMode, FitDesktopToItems, Dettach, Borders/Margins/Padding through series of confirm-dialogs
– “Toggle panel”: allows to collapse/expand the panel height to 2 rows, 0px or 1px through series of confirm-dialogs.








D5 Creation