I am trying to write a method that will toggle a button from being disabled to being enabled and back using a simple if statement.
I would assume that it would be something like
if (buttonDisable.setEnabled(true) == true){
//do stuff
}
But I haven’t had much luck finding my answer via google.
Don’t test the display of the model, test the model.
That way if you change the model, you avoid a level of dispatch (view — updates —> model — updates —> view(s))
A better solution is to make your model changes independent of the view. This way you don’t get tied into requiring a specific view to be present to make the model change.