I’m trying to create a favorite for a radio but I have a problem
the name and add to the list of favorites, but when I want to listen for example the station 3 that I put in favorite I have the name that appears but the link and the image are those of the first station.
what to do thank you
Do you properly update and refresh the link and image when the station is changed?
As always with problems like this, it is a lot easier to identify the problem if you present a screen shot of your logic…
I added a listpicker and now I manage to register a complete link but if I register another one always has the same links
There are quite a few things.
Firstly, you are using the string function to look for an existing favorite in AddFav. But you make global Fav a list by adding to it. Yet, at first, when you get the first value for “Fav” in Tiny_DB, you assign it an empty string value.
What you need to use is the “is in list?” list function, and set the “value If Tag Not There” to be “empty list” as opposed to a zero length string. You can actually dispense with the check to see if the tag existed, since global Fav would be assigned to an empty list if it did not exist, and that is precisely what you need.
I’m not very talented, I realized this part of the app with videos that I watched on YouTube can you a little more help me thank you
Replace all the reference to ‘global Fav’ that treat it as a string with references that consider it a list.
Then things will have a better chance of working.
must we redo everything then? can you help me
Not everything, but the parts that refer to an object as being something they are not (a string instead of a list) those have to be corrected.
Start with the block Screen1.Initialize.
Make it set ‘global Fav’ to call Tiny_DB1 GetValue tag=Fav, value If Tag Not There = empty list
Then you can make your conditional stuff a function of whether ‘global Fav’ is an empty list or not.
thank you it works but I would like to find but favorite on another screen is this possible thank you
in fact I would like to use 3 screens the first to put a favorite button, the second one where I save the favorites and the third or I see my favorites
for now everything works on a screen and this is not very practical thank you
I added in my first screen “open to other screen with value” see picture and in the second screen “when favorite initialize” see picture for now all that goes well, but when I click on the link that is saved in the favorites I go on another link. can you still help me? thank you
The ‘global Liens’ in Screen1 is not the same as in the FavoriS screen.
They may appear to have the same name, but in reality, you could consider the first to be actually named Screen1.Liens and the second FavoriS.Liens.
The same is true for List_Picker1; what happens to the List_Picker1of Screen1 is completely independent form what happens to the List_Picker1 from FavoriS.
It is as if Screen1 and FavoriS were two independent programs, and they communicate through the “start value” (and “close screen with value result=”).
If you want to go with multiple screens, you would then have to pass ALL the required information across; either by making a large list that is stuffed in the ‘start value’ and that the other screen would have to parse and assign one by one to it local global variables and components, or you save the stuff in one or several Tiny_DB tags, with the other screen to fetch them as required.
hello i did not understand well can you show me in picture
No I cannot show you in picture that two things named the same are not the same if they are on different screens.
They will look the same.
But are not.
Your “global Liens” in Screen1 is NOT THE SAME “global Liens” in screen FavoriS. The value you give to “Liens” in Screen1 WILL NOT BE transposed to the “Liens” in FavoriS. They are DIFFERENT variables that just happen to have the same name.
I am absent a few days and I do not have a computer on hand so I contacted you on Wednesday and I have a problem also with the player that often stops but I tried other applications and it works without stopping I do not know why I tried the web viewers and the player of Tunkable and I often have stops
the picture is screen favoriS
It does not matter that the name is different if they still do not contain the required information.
In your screen1, can you output what you are expecting to have in “global Fav”?
What he you saved in TinyDB under the tag “Favori”? If the tag does not exist, then “global favoris” will be an empty list.
Look, either you pass your favorites to the second screen as a ‘start value’ list, or through TinyDB, either will be fine as long as you are consistent. With TinyDB, that means use the EXACT SAME tag, spelled the exact same.
If you use start values, you need to check if those happen to be empty, or else the logic will fail if the list is empty.
Finally, saying “it does not work” is too vague.
What does not work? Do you get a list that you can pick? Do you get an empty list?
You apparently changed something on your screen#2 “FavoriS” one week later, but what about Screen1? Has it been changed?
And why do you need two screens anyway?
You can have the put a favorite, the save a favorite and the see the favorite in the same screen. That would completely negate the need for this complex inter-screen communication which you are having a problem mastering.
I need a screen for the favorites because on my app I use 4 screens