How do I check on all of the values of objects in an array?
-
I'm just trying to word this to check if any of the button objects in the array ("Checkboxes") return a "false":
if (Checkboxes.forEach(Obj.getValue()) != true)
{
Checkboxes[16].setValue(false);
}I'm stuck on figuring out what to put as the "forEach" parameter to check the values.
I want it so that if any of the buttons are off, that Checkboxes[16] is also set to off. -
@VirtualVirgin
You could do something like this:HiseSnippet 832.3ocsUssaSDCD0NsKhc4hnR7AX0mRQnpbqzfPndIsEhf1FQfJ3IjiWuMl50dYs2BQH9M36j+.X7ta6l1FUZiD4gnLdly3Sl4LiGjpYbiQmhvAueRBGguu2vIJ63dioBEp+NH7C81mZr7TRwQaOIgZL7PDFuvqbGf8WDk+42arMURULd0QHzQZAi+VQrvVc5fMeiPJ2iFxeuHdpn6rYelV0SK0Y.eVvqAJgxNgdL+.pKrZdnWSMiQ3m30lG1paW5ZcZ2l084cYqync4rliVuQKZTX6t7vQgcVqCEguytgBqNcnkZ4FHoaqCmLbr9aphK3HgQLRxcFMQCgat3XTuwBY3fyJNFDBu3fpR0BEkpG6suHTb94UkrGk6fTgX5hFt10Qol2BJgmhRKVPok7FxREI1JON9bOu9JnCFQgdyzToHVTsuf85ogHT1Uiomv2KELNGQ8m0nwSIvWq7hf.n+XrfRfyNYj96bC4kjyPdL2tkT1SGmnUfso9xamYsZ0xNbQ5z5iHB0TPWI3GA9hn5ibHOhJy30WYk.eeHeFsjuZRpPYqu7VVhjCBPBjUxn7LRFSMDJ4TGFhRaI7ulQkDqlzXU3178C9YTlhYEPnZ0AZK+PU87qK3mAjK6JJZl9b+sR0RIOcltcJ2zqCXcUV7Hd5SKn44ABcpK19uyMq8yJpxSEnV0WIrGlvKs2SKCcsU2uupXAU1l.YSsRFBgZyEMOrTzTzuPBHI9dEFMQ4ze5IZzs.dqKC+2af9P+cnVpS9VRIflI7TqvUMv6vOEVXTHl881gaNwpSx4botBJf2.V+8pqTr4jJiOsI5VkoVWISd3ekuC6JidvPuNLSRsWbSfaGYoCPebgwO2HlxHrSlt9bKVOz3ZWObSo3RdCDV13YywZyfiNIz+ANVtT8Ad6FEwY1JBtn2debd2f9Ot92oyrB0w6SsoBnQ6cPV7P3wGFGtckhKMt9cMmluvtgy1UAFxUg4F+A9T5royFW5r4YNQwTVp9yrhgF2Z66leBvIU9yZ9v6qfMYFiZwvqHelwtXptBvVyKv1yKvNyKv0lWfOadAt97Br6+Fn6Q9sxr53hwFDZ+A6luaCi2UQAEXtZE8W.xTBkN.
But it would be good to know what you have in mind so that we can make a more suitable suggestion.
-
@Oli-Ullmann said in How do I check on all of the values of objects in an array?:
@VirtualVirgin
You could do something like this:HiseSnippet 832.3ocsUssaSDCD0NsKhc4hnR7AX0mRQnpbqzfPndIsEhf1FQfJ3IjiWuMl50dYs2BQH9M36j+.X7ta6l1FUZiD4gnLdly3Sl4LiGjpYbiQmhvAueRBGguu2vIJ63dioBEp+NH7C81mZr7TRwQaOIgZL7PDFuvqbGf8WDk+42arMURULd0QHzQZAi+VQrvVc5fMeiPJ2iFxeuHdpn6rYelV0SK0Y.eVvqAJgxNgdL+.pKrZdnWSMiQ3m30lG1paW5ZcZ2l084cYqync4rliVuQKZTX6t7vQgcVqCEguytgBqNcnkZ4FHoaqCmLbr9aphK3HgQLRxcFMQCgat3XTuwBY3fyJNFDBu3fpR0BEkpG6suHTb94UkrGk6fTgX5hFt10Qol2BJgmhRKVPok7FxREI1JON9bOu9JnCFQgdyzToHVTsuf85ogHT1Uiomv2KELNGQ8m0nwSIvWq7hf.n+XrfRfyNYj96bC4kjyPdL2tkT1SGmnUfso9xamYsZ0xNbQ5z5iHB0TPWI3GA9hn5ibHOhJy30WYk.eeHeFsjuZRpPYqu7VVhjCBPBjUxn7LRFSMDJ4TGFhRaI7ulQkDqlzXU3178C9YTlhYEPnZ0AZK+PU87qK3mAjK6JJZl9b+sR0RIOcltcJ2zqCXcUV7Hd5SKn44ABcpK19uyMq8yJpxSEnV0WIrGlvKs2SKCcsU2uupXAU1l.YSsRFBgZyEMOrTzTzuPBHI9dEFMQ4ze5IZzs.dqKC+2af9P+cnVpS9VRIflI7TqvUMv6vOEVXTHl881gaNwpSx4botBJf2.V+8pqTr4jJiOsI5VkoVWISd3ekuC6JidvPuNLSRsWbSfaGYoCPebgwO2HlxHrSlt9bKVOz3ZWObSo3RdCDV13YywZyfiNIz+ANVtT8Ad6FEwY1JBtn2debd2f9Ot92oyrB0w6SsoBnQ6cPV7P3wGFGtckhKMt9cMmluvtgy1UAFxUg4F+A9T5royFW5r4YNQwTVp9yrhgF2Z66leBvIU9yZ9v6qfMYFiZwvqHelwtXptBvVyKv1yKvNyKv0lWfOadAt97Br6+Fn6Q9sxr53hwFDZ+A6luaCi2UQAEXtZE8W.xTBkN.
But it would be good to know what you have in mind so that we can make a more suitable suggestion.
Thank you! That works great.
I can send you a snippet of the project if you are interested. -
@VirtualVirgin
Great, that it works for you! :-)
Sure, send me a snippet and I'll take a look at it tomorrow. :-)All the best
Oli