What I’m trying to do:
I’m trying to implement the navigation using the advance tip with the one click handling for all links What I’ve tried and what’s not working:
When I add the code below. I"ve commented it out for now because it doesn’t show any left navigation menu with that code running. So if you uncomment that and run it it shows a blank. I’ve set my links to run the def navigation_link_click function.
So did I do something wrong or is there a bug?
# click handler for all menu links
#self.settings_left_menu_link.tag.form_to_open = private_settings_form()
#self.trade_settings_left_menu_link.tag.form_to_open = user_settings_form()
It works fine for me when those two lines are added to the bottom of the __init__ function, e.g.:
def __init__(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
# Any code you write here will run when the form opens.
self.settings_left_menu_link.tag.form_to_open = private_settings_form()
self.trade_settings_left_menu_link.tag.form_to_open = user_settings_form()
ok awesome, got it working and got the links to work too thank you.
maybe they need to provide instructions that it needs to be under the init()
since i don’t thikne i read that anywhere just looking at the image, it seems like it should be place wrongly below the import statements.
I guess along the same lines of this problem, I’m also trying to make it appear that its clicked.
my code isn’t applying the 'selected" attribute to the role:
self.settings_left_menu_link.role = 'selected'
is there a tool to troubleshoot why certain things aren’t going through? it sems like I followed the instruction right. I can change it manually but its not changing in code.
You put that code into a function that is never getting called.
Normally the console and the app logs would both show that output. But, as noted above, the function it’s in is never getting called, so the output never happens.
I can see inside the “form_to_open” object, but can’t see all the attributes of the form, but what I really need is the name or accessing the name of the form, so if i know what form is opened I can make the link look "selected.
Thanks for letting me post everyone, and talking out lout to myself. I figured it out, googled and found dir() helps to look whats inside the object and I can figure out the rest.
Phew… awesome thank much cleaner code… Where would I find information like that, or how do you know or where do you learn that 'event_args[‘sender’]" is the actual link clicked?