Question

I've created a custom cell editor to display an error when the user enters wrong information, however there seems to be a problem as if I have one check it works fine, however onces I add an OR with another check in the if statement the whole thing breaks and displays an error no matter what you put in. what am I doing wrong?

EDIT: Another question, in my second if statement I want it to print out a soft hyphen, it didn't parse correctly when I pasted the code. It prints out my error how can I fix this?

It's fixed

Was it helpful?

Solution

In your case the two ored statements amount to true. Try a few values and you will see what happens if it is either not male or not m. If it is m, it is not male so lhs is true. If it is male, it is not m so rhs is true. I believe you want && instead of ||.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top