TrianguloY
now browsing by tag
Double bug report (don’t be aware of the length of this post :P )
I found this while testing, but researching about it I found the root cause, that is specific. This second bug can be something difficult to achieve, depending how LL is saving this data.
Ok, let’s stop writing abstractly. These are the bugs:
[1] The geometry editor don’t want you to use decimals…if you are Spaniard (some other languages as well)
To be honest I can’t say if this bug was here before…maybe it was since the geometry editor was added!
The bug is simple: the float numbers that you can input in the geometry editor takes ‘.’ dots as the separator between decimals. If your mobile phone is set to a language that use this notation, all is ok.
But if, like Spanish and other languages, you use the ‘,’ comma instead, the geometry editor show the number with the comma, as well as the prompt window…so you need to change it to a dot every time you want to input a new number! Remember that it takes the number with dot, no comma.
Solution? Don’t let the system choose the decimal character, or make the editor to also accept commas.
Note: maybe this happen with other float inputs in other settings as well.
[2] half a pixel? Please no
As the title say, it’s physically impossible to have 1/2 pixel (1/3 , 6/19 , …)
So…why you can set the position of items with decimals?
This is not a silly question, and the answer you can think of is: ‘because you can zoom’
…
Nice try, but no. If an item is at 1.75 it is rounded and placed at 2 even with the biggest zoom. It’s easy to try, just add two identical shortcuts, one placed at ( 0 , 1 ) the other at ( 0.4 , 0.5 ) for example. They will look identical. (Maybe you think this is not very important, it’s only 0.1 more. But remember I’m talking when zoom, and a one pixel line can have the size of the screen, believe me it matters)
So…why? Why don’t just only let the user set it as integers, like with size?
If there is a ‘hidden’ reason, maybe you can alert it when using the .getPositionX/Y … I was crazy trying to figure why my script (will be posted soon) didn’t work with zoom. Then I realized it get fixed just using Math.round( .getPositionX/Y )
(And I have been trying to figure this out since 10.0 version was release. But hey, because of this I found the setPosition(,,,false) bug and this one. Not bad)
Oh, and I also think I know how the .translateIntoScreenCoordX/Y work…because it has also the bug ;)
]]>Bug report:
In firsts alphas, you fixed a bug related to the events of a script taking a different containerwhen scrolling…well, it was fixed.
But time to time I had this bug, in latest stable version. Now I think I can provide steps:
In a desktop, different from the main one, set the position change to a script that takes an item LL.getCurrentDesktop().getItemById(#) and a property, for example the PositionY()
Add a folder, don’t open it.
Move a little the desktop (the script will act)
Open the folder.
Press back as crazy (action set to ‘go back’) the folder will close and almost immediately the desktop will change to the main one and ERROR: cannot call method getpositiony of null.
]]>The script repository is growing, and all the scripts in a list can be as chaotic as Google+ posts (sorry for the…
The script repository is growing, and all the scripts in a list can be as chaotic as Google+ posts (sorry for the bad joke 😛 )
That’s why I decided to put them in categories.
These are the ones I thought about. You can suggest others.
Also, if you think it’s a bad idea it’s easy to restore the list, no problem.
]]>Some of you know this app, but in case you don’t this is an app that now lets you compile 9.png files.
The app is easy to use, the only thing you need to know is that you need the image (this is not a painter app, but I can recommend some good ones) and once you have it just select the borders/margins (if you don’t know what are they, go check what a 9.png file is) and save. It also has a built-in previewer to see the result.
Then you can use the complied picture in LL or where you want.
Note: this was an old app that could only save non-compiled pictures. I asked the developer, and now he finally update it to save compiled ones. As he says in the description, this can have bugs even thought I tested and seems ok.
Question to scripters:
I want to set the position of a desktop with animation (‘true’) and then I want to do some other things.
The problem is that setPosition(x,y,s,true) is processed separately, I mean, the rest of the script is immediately run after, while the desktop is scrolling.
What I’m doing now is to launch the rest of the code with a timeout after some millisecond, but I was looking for a ‘more exact’ way.
Do you know any? Do you think the API will need to have a dedicated function?
]]>API suggestion:
Now I’m playing with items and zoom. I realized that take the ‘bounding box’ of an item is easy with the getPosition and the getHeight/Width…but:
If the scale is different you need to multiply by it.
If the rotation is different you need to do some trigonometric operations.
If the skew is different…
So my suggestion is, since the launcher already know the values (in edit mode you can see the box)
What about:
Rect item.getBoundingBox()
Like the container, but with items.
]]>
D5 Creation