Hi, I have a long list of buttons. Some of them can be selected and its image will be: "Button1-on.png".
When I click the "Save" button I should only save the buttons that have that image active. Which block should I insert as component value?
My sentence is: "...if in the list "global Index_Save" there is a button with the image" Button1-on.png ", then use the text of the button as the element of the list ..."
Thank You
Sorry, but didn't get the message. Maybe this is helpful to you.
Thanks, ...can you explain better?
Yes
..this I already used when click buttons. But here I have to add to a list instead of clicking these buttons.
I dont think you need to maintained this list, since you concern is just to get to know the button's text whose image is Button1-on.png, and create a list to those button.text. A sub-set of total buttons whose image is specific one.
Yes, that would be enough, but I actually have two types of lists:
- one with clicked buttons that change image
- second with the buttons divided into four categories to be saved
If I add the "add to list" block at the point where I drew the arrows, all the clicked buttons are added without distinction.
...then the list of data saved is added into the TableView component
...I keep thinking about the solution and I thought: ...if I could use the group of four lists to set the selected / clicked buttons, then I would not need to use the first group of lists with the buttons that change the image by clicking.
I should then add the four variables of lists as I indicated with the arrow, but it won't let me do that with the red "join" block.
So I could easily apply what You have suggested before.
What do you think about it? how can i do it?
I'm trying to analyze your first option:
here you are explaining how to join the four lists, right? Once I have joined the lists, why do you insert a specific item? ...I should take any item that has the image "Button1-on.png" and put it in the "Data List".
I don't understand the block of "set button text to true"...
...you probably mean something I don't understand?
At this point my sentence would be:
"When a button is clicked ...if a button/component is in one of the four lists, then add its text to the four positions of the" Data List ", and also change its image to "Button1-on.png"...otherwise set button image to "Button1-off.png" and do not add anything to the "Data List"... "
I am sending you my interpretation of your blocks, but still there is a problem:
... if I find all the "on" buttons in one of the four lists, I will not be able to divide them into the four positions (columns of the table) of the Data List. So I would have to repeat this combination of blocks for each of the four lists ... right?
Where will you search for it? Definatly in one of four list which you discussed earlier.
THis is just a debug technique, to know what we are getting once a process finished.
For this I have suggested two methods. In this part you can do to add text fo the component to Data List.
Here, your requirment/issue is going to somewhat different direction. That I am not getting.
yes ...initially I thought about merging the four lists, but then I reflected further and this doesn't work, because I still need to divide the clicked "on" buttons according to the four lists that belong to the four positions of the Data List.
How index can be string? Should be integer, isn't it?
what block should I insert there? ...can I just let it without any block?
...anyway I tired how it works and when I click some button appears the error message: "Insert list item: Attempt to insert item 2 into the list []. The maximum valid item number is 1."
I find your app confusing, like that Duchamp painting of a woman falling down a staircase.
What are those 4 lists supposed to represent?
Yes, it's easier to understand using the app