You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no reason why this has to be above a form. It could very easily be above a class loaded in a startup module.
This might make the whole - I have different top level forms - work much better than having to change your sidebars and nav bars.
I think this would take maybe 3 lines of code to work in the routing module.
Then the startup module might look like.
fromanvil_extrasimportrouting@routing.main_routerclassRouteManager:
defon_navigation(self, url_hash, **nav_args):
# some logic to replace the open form# some logic to adjust the look of the current top level form
...
route_manager=Manager()
The manager's job would be to make sure the top level form was correct given the hash. As well as to open the initial top level form.
And I guess to call any methods on the top level form that would formally have happened in an on_navigation call back method. (since the manager now intercepts this callback).
This discussion was converted from issue #185 on November 25, 2021 15:55.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
There's no reason why this has to be above a form. It could very easily be above a class loaded in a startup module.
This might make the whole - I have different top level forms - work much better than having to change your sidebars and nav bars.
I think this would take maybe 3 lines of code to work in the routing module.
Then the startup module might look like.
The manager's job would be to make sure the top level form was correct given the hash. As well as to open the initial top level form.
And I guess to call any methods on the top level form that would formally have happened in an
on_navigation
call back method. (since the manager now intercepts this callback).Beta Was this translation helpful? Give feedback.
All reactions