How can I use the switch component to dynamically display different data

@tatiang, @muneer:
Hello everyone:
I am making an app that involves using 3 text to speak. Everything was working fine.

But I decided to incorporate three switches so that the user could choose at any given time. Yesterday it worked fantastically: when pronouncing each word, it changed its color and size…


but today what it does is that it leaves the page blank, and of course it doesn’t speakanything…


I’ve tried using and without using what is shown here in the blocks of the three languages, but it shows no difference

Is this because of my poor programming, or is it something else?

1 Like

Either this condition is structured wrong or I could get what you’re up to.
image

@muneer
Hi, I took this example of yours

but you know I don´t know much. Anyway, how could it work yesterday and not today? I use to press Ctrl + F5… could you help me?
Thanks

1 Like

From the condition that you shared, you will see no labels and here no sounds unless you set the 3 switches to OFF which is a weird condition to check for.

It’s hard to help you when you create separate topics for the same issue. It’s better to update your existing topic so that all of the prior knowledge and suggestions are visible.

But… it seems that you should have a separate IF condition for each switch value rather than combining them into one condition.

1 Like

Well, yesterday I was talking about the same switches, but using them in a DVL… and it’s working fine… by now

And now we have labels again, but no sound… just a little better, but useless… I can´t understand it

How do I do it so that it works fine?

The way you have it in your screenshot above:

image

Or this:

image

It’s not clear to me why it’s not working and how you’ve tested/verified that (e.g. with debugging labels to make sure sections of code are actually running). Do the SpeakUK, etc. functions run at all? Do they start and not speak anything? Do they not start? Are they skipped?

1 Like

@ tatiang, @muneer:
hi,
When I execute with live test, the background color of the flags changes, according to the expected succession… but the colors of the different labels (English, British Transc., American Transc. and Spanish) do not change, nor does it sound any sound. Neither when I click on the DVL, only the backgrounds of the flags change

The problem is that you’re explaining it in a very general way, that no sound plays when you test the project.

What I’m suggesting is that you need to find ways to show on screen that a particular set of blocks has run. To make sure your If conditions are working properly.

I suggest a way to do that here:

2 Likes

@tatiang , @muneer
Thanks for the advice and the video. It is very interesting… In my case, I know exactly what doesn’t work, because it doesn’t run on the screen page when I try a live test : nothing inside the DVL works. And what is outside, works. But I don’t know why.

1 Like

Have you followed @tatiang suggestion of using debug labels?

If you have you’d by now seen which block or group of blocks that does not get executed.