Difference in output of text length depending on from where it comes, list direkt, or list with blocks between

Ah, ok now I understand, i was solving this by math, (Is not the easiest way but it gives me the posibility to display it properly that you can understand better what I want to achieve).... And sometimes you have a block Combination that works better...
That I can try it....

And here my newest AIA file:

leftedge_copy_6jan02_35.aia (24.1 KB)

Hello Ghica, yes, indead we must consider the fontsize, this is what I will find out, a block combination that gives me how much letters my item contains, (the biggest one) than this in relation with the fontsize, and then converter in pixel, to have the width.... (Hey, I was learning to write the word "width", yipiehiaiey).... :slightly_smiling_face::slightly_smiling_face::slightly_smiling_face::slightly_smiling_face::slightly_smiling_face::slightly_smiling_face::+1::+1::+1::grin:

Und hier noch meine neueste AIA file: (wie versprochen)

leftedge_copy_6jan02_35.aia (24.1 KB)

Here's a solution that doesn't use any math. So it will always work regardless of the font. As @Usane wrote earlier, just set the button width to -1.

leftedge_copy_1_5jan8_42.aia (23.5 KB)

Hello Patrick,

Finally you found a solution, and a solution that is simple to make and to understand even for me, you did iiiitttt !!!
:+1::+1::+1::+1::+1::+1::+1::+1::+1::+1:
Congratulations.

And here the final product, (for now):

leftedge_copy_1_6jan7_17.aia (23.6 KB)


This is what the app looks like on my phone.

Probably the sprites are moving to the 4 corners, until stopped, but what is the purpose of those labels with the large font?

And I think there is duplication in the code. You can either move a sprite to a certain position, or let it head into a certain direction, but to do both, I am not sure what happens.

Hello Ghica, wonderful that you look at me and my AIA files...

But there is something strange in this picture, because by me it is workin well at all, but sometimes you opened the old one of my AIA file, this one with the incomplete programmation.

But by me it gives only the 8 lines, not 16...
For sure there are rests of my old programming,

I was cleaning it all before I send my last AIA...

Or which AIA you tested there? Wait I will send you the newest version...

leftedge_copy_1_6jan7_17.aia (23.6 KB)

Ok, try this... And if this gives the same result, then give me little bit of time to look in it if this gives the same result...

You made some change in the aia file compared to my aia, which causes the line to be more than 8.

Yes, there was situation, where the wrong block was moving, but I was thinking that I was put the block in the right place, ... ok, no problem, I have the original from you saved already... Then I will remake my changes in a second copy...

But in my companion even this faulty version works fine ... Hmmm strange... But I will solve that, no worries... And excuse the inconveniences....

Entschuldige bitte vielmals,:slightly_frowning_face::slightly_frowning_face::slightly_frowning_face::slightly_frowning_face:

Looking at your code, I wonder what you want to achieve, do you want to display the current sprites coordinates all the time while the app is running? Since your current code will only display the sprite locations once and will do so in a loop, it will always be the initial sprite coordinates. Even when the sprite drops, your code won't catch it.

Yes , you are so right, this was my next cuestion, what I was having too, but I was interested to finish, the length/ width problem, no that we was solving this first problem, I will look first-time the working AIA, to see what is the next thing where I want to put my learning interest,... But I like you intelligence....

I will look tomorrow, because today my concentration is empty... Don't be decepcioned when I make a little brake for today... I'm a little bit old, and old people sometimes need to walk a little slower...

So you will see some messages from me tomorrow...

We'll all probably have gray hairs before this topic is resolved/closed. :wink:

Please not so many... :pray: there are already almost 100 posts...

1 Like

I do not know which version, I tried all three, and to me they look all the same. I posted the picture because I wanted to know what you want to do, certainly not make an app that looks like this.

:joy::joy::joy::joy::joy::joy:

And you are right, I will certainly not let the app like this ...

But for making a App or display something, or to programming something, I first need to know how MIT App Inventor works, how to display something, and last but not least, to know which data are relevant, and what blocks i need to use, to achieve this...

This app is the Prototype, but also my measuring tool, and finally a tool to programming more comfortably and with less errors... Because I will use only the commands, that is really needed, and that i will find out with the time...

And how you see, I was trying some things by my self without asking you, and sometimes I was not stopping to ask you sometimes stupid cuestions until I understand the block, or block's in cuestion fully...

And for the past, thanks for your Patience with me...

I hope I will learn it so that I someday know so much like you.

current sprites coordinates all the time while the app is running

Are you sure that is a good idea? You will not see anything until the sprites stop. I mean there will be a numbers running very fast while the sprites moving, like the thousandths of the seconds on a clock.

Hmm... I see you studying my case werry profoundly, and you every time relook my past, posts, I have the sensation, that you now are better informed about my case, then me.... This is werry fine.

And yes you are right, and this is one of my next things what I see to, when I was running the app.

And additiv to what you found out, there are an other problem... I don't know if you see it now, but in the list coming out wrong coordinates...

Fo example there we have numbers like y=20 but the middle sprite,( which is that with the arrow down) That mus give out a y coord like 80 or so...

And by the X coords are also errors...

Look and you will see...

And Ghica was found out that by the SpriteNames there is a double calculating of the same data's...

My problem is I have not a computerscreen, so that I can not work out from where comes the errors, i have only my tablet screen...

And the other problem is it now on button1 gives me out 84 instead of 124, and I can not find from where comes the error...

Thanks so much for looking in to my app

Greetings

Hallo an alle,

Ich habe gerade wieder Probleme mit dem length block, da bekomme ich Jetzt kein Resultat mehr, sondern nur noch eine Fehlermeldung.

Hier sende ich die AIA file

Test4.aia (2.6 KB)

You cannot add to a list itself. Use an other list.
What do you want to achieve?

Edit: You can.
The problem with the button 3.

THe problem is, it does not update its own length if you add itself to itself so it looks like it has only one element. I do not know if it is a bug, or it is coming from the logic of the way it works.
As I said, use 2 lists.

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.