What the code is supposed to do is, when clicked compare the textField value with the given value and change the source of the clicked button accordingly.

It doesn't do that. I can't seem to find why.