-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function to massive setDisplay #247
Comments
your function definition is wrong: you are passing the cards by value. Use ref or pointers. Example: void setOutput(const String& outputType, Card& zone, Card& zoneSlave, Card& zoneAux, Card& buttonZone, Card& buttonZoneAux){ Also, what you wan to do is better served using switch/case since conditions are mutually exclusive. switch(outputType.toInt()) {
case 0: {
/// setDisplay(...)
break;
}
case 1: {
/// setDisplay(...)
break;
}
default:
break;
} |
Thanks @mathieucarbou !!! |
No because the callback does not hold the information about the card, but what you can do is call the same function. |
thanks @mathieucarbou |
Hello, I'm trying to create a function to show/hide some cards according to the value of a variable
I wrote the following, but it doesnt work
Is there some way to make a kind of function to avoid repeat all this lines for each card?
BR
The text was updated successfully, but these errors were encountered: