forked from goxr3plus/XR3Player
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Many fields moved from Main to MainLoader
The rest of the application should not know anything about Main, so Main should not have any public fields. They have been moved to the class where they are written: MainLoader. Getter methods have been introduced in MainLoader, and the (moved) fields have been made private. MainLoader is not likely to be the final destination of all these fields.
- Loading branch information
1 parent
56cfe5c
commit 3283ca7
Showing
52 changed files
with
654 additions
and
520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
3283ca7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code change is not good, because it doesn’t do anything about the global state that was kept in static fields in Main. They have just been moved to MainLoader, but they are still static, and they still represent global state.
Instead we should have a class with non-static members, holding the same values. There should only be one instance of this new class, and a reference to it should be kept by objects that need it. Likely, we create the single instance in Main, and pass a reference to it to the main controller class.