how to make list picker have sexagesimal (h/minutes/sec) system

33 views
Skip to first unread message

Aram Ibrahim

unread,
Oct 31, 2019, 9:14:41 AM10/31/19
to MIT App Inventor Forum
I need to make calculations with minutes and seconds but the list picker doesn't count them as valid

TimAI2

unread,
Oct 31, 2019, 9:42:31 AM10/31/19
to MIT App Inventor Forum
Please show your relevant blocks, so we can see what you are trying to do

Right Click in Blocks Editor and select "Download Blocks as Image"
(use image editor to crop etc. if required)

In the forum, click on the image button to upload your blocks image



Aram Ibrahim

unread,
Oct 31, 2019, 10:19:02 AM10/31/19
to MIT App Inventor Forum

blocks.png


Aram Ibrahim

unread,
Oct 31, 2019, 10:26:35 AM10/31/19
to MIT App Inventor Forum
I need to make some operations that are based on minutes/seconds, so i need the list pickers to recognize the difference

TimAI2

unread,
Oct 31, 2019, 12:37:59 PM10/31/19
to MIT App Inventor Forum
I am none the wiser from your blocks...

What are your listpicker elements? (all of them, the listpickers, that is)
 Are you working in seconds/milliseconds ?

Aram Ibrahim

unread,
Oct 31, 2019, 12:53:33 PM10/31/19
to MIT App Inventor Forum
lstp_distàncies is the listpicker for longitude
lstp_temps is for time
lstp_parcial is a different measure of time
lstp_palades are the rpm
lstp_watt are the average watt

I'm working with minutes and seconds (ex: 1minute 35sec)

TimAI2

unread,
Oct 31, 2019, 2:53:55 PM10/31/19
to MIT App Inventor Forum
You are not making it easy for us ;)

If your listpicker is displaying strings with, for example: 1min 35 sec, 2min 10 sec, 30sec
you will need to have a conversion process running in the back ground to
make your string into a number e.g. 1min 35sec  >> 95 (secs) or 95000 (milliseconds)

If your time settings are "fixed" you can setup a list or table with these conversions, then use indexing to get a "number" to use on your calculations

Aram Ibrahim

unread,
Oct 31, 2019, 3:27:35 PM10/31/19
to MIT App Inventor Forum
i'm sorry for making this difficult but english isn't my first language and i have trouble getting what i mean across. Also, i don't have a great knowledge of how appinventor works so that ads to it.

do you mean that i have to make extra operations on the blocs?
or is there an other option, like showing one list and having another one that is on the background? like having a list and a shadow list (one shows 1min 35 sec and the other gives the value 95 sec)

thanks for the help

TimAI2

unread,
Oct 31, 2019, 3:51:53 PM10/31/19
to MIT App Inventor Forum
Yes, that is the idea (showing one list and having another one that is on the background)

Aram Ibrahim

unread,
Oct 31, 2019, 4:22:32 PM10/31/19
to MIT App Inventor Forum
how do i do that?

Aram Ibrahim

unread,
Oct 31, 2019, 4:23:26 PM10/31/19
to MIT App Inventor Forum
is it the selection part?

TimAI2

unread,
Oct 31, 2019, 4:47:05 PM10/31/19
to MIT App Inventor Forum
Here are two little procedures to convert "time" to seconds and seconds to "time"
Hope this helps ?

blocksTimeSecConverters.png


or if you create a list of lists and use look up in pairs


blocksTimeListOfListsLookUp.png



Aram Ibrahim

unread,
Oct 31, 2019, 6:01:50 PM10/31/19
to MIT App Inventor Forum
thanks, i'll try to adapt my app to this and if it doesn't work i'll ask again.

thanks for the trouble
Reply all
Reply to author
Forward
0 new messages