What I’m trying to do:
Redirect between multi pages using routing.set_url_hash()
What I’ve tried and what’s not working:
Get a form empty and catch log error like
#routing: problem loading route: 'Preview'. Another form was during the call to __init__. exiting this navigation
#routing: exiting navigation level: 2
Code Sample:
before:
def __init__(self, **properties):
self.init_components(**properties)
anvil.server.call("functionA")
anvil.server.call("functionB")
anvil.server.call("functionC")
-----//----
after:
def __init__(self, **properties):
self.init_components(**properties)
self.add_event_handler('show', self.form_show)
def form_show(self, **event_args):
anvil.server.call("functionA")
anvil.server.call("functionB")
anvil.server.call("functionC")
I have moved the call to server code, which might be better. Is there any other way that is even more optimal?
Clone link:
share a copy of your app