How many times does this client code call the server?
def get_server_state(self):
with anvil.server.no_loading_indicator:
_state = anvil.server.call_s('get_state')
self.hand = _state['hand']
self.selected_dice = _state['selected_dice']
self.active_player_index = _state['active_player_index']
self.active_player = _state['active_player']
self.scores = _state['player_scores']
The server code retrieves a single row from the database
@anvil.server.callable
def get_state():
return app_tables.gamestate.get(id=1)
I know, from a previous question, I should add that all the values in the row are either numbers, text, or simple objects (list or dictionary). Does the client call the server once, or six times? (If the answer is six, are there ways to make it only once?)
Thanks, as always!
Al