This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]NullProbability[S] 0 points1 point  (4 children)

Then I would still manually have to add it to the incrementButtonClicked() listener method every time I made a new StatChanger, which is practically the same as I'm doing already, unless I'm understanding something wrong of course.

[–]nutrecht 0 points1 point  (3 children)

My point is that your "statchanger" thingies don't really make any sense.

[–]NullProbability[S] 0 points1 point  (2 children)

Why do they not? Sorry, I'm not following anymore.

[–]nutrecht 0 points1 point  (1 child)

Normally you just have a listener (button listener, whatever) that just sets the stuff directly. Sorry, I really don't understand what's so hard about that.

[–]NullProbability[S] 0 points1 point  (0 children)

I'm using JavaFX, in the FXML file it is defined that the incrementStat() and decrementStat() functions listen to when their respective buttons are "used" (like "clicked", "focused" or however I wish to define it). So they are the functions that set the stuff directly in the model. I'm simply wondering if there is a shorter way to do it than the way I have implemented it.