Closed caliandro-arturo closed 3 years ago
I think is better to use an unified modelling of messages: -all object (java objects of a message class)
OR
debugging will be easier.
showUpdate
is only used by the client update handler to delegate the printing of a specific text to the view (on CLI), and that text is coded into the same handler, not received from the server.
e.g. (in the update handler):
public void modelElementFooUpdateHandler() {
instructionsSet();
showUpdate("the model element Foo has been updated.");
}
But, as said before, this approach cannot be used to show GUI updates.
yes I understand not sent from server. simply simplicity is from the same logic
GUI events such as scene switching (JavaFX) or updates are context dependent. Using a method that receives a String as parameter is good for CLI, where it is enough to change the model and reprint previously-shown elements in order to handle updates (
showUpdates
in CLI is currently only used for printing textual update notifications).More specific
showUpdate-
methods need to be implemented into View class.