ok, anyone have a good example of something like a...
# tornadofx
s
ok, anyone have a good example of something like a side navigation menu, where each item would bring forward a new view into the main viewing area? I'm using the JFoenix drawer and all of that is fine. I'm looking more for the "right" way to handle setting up the menu items, clicking on them, and having the views change, and having the active menu item be highlighted. Its one of those things i know i can brute force my way into with actions and listeners and things we hate, but want to try to do it in a more proper tornadofx/binding/eventbus way.
a
are you talking about a drawer?
wait, hold on. The thing is, you could do what you think is best, basically. Depends on the use case and what makes the most sense with the UI - there's good reference w pics and everything here: https://edvin.gitbooks.io/tornadofx-guide/content/part1/7.%20Layouts%20and%20Menus.html
s
sorry my explanation of what i needed was probably bad. Lets assume that in my main layout view i have the working drawer with some buttons in it for navigation. And i've added actions to those buttons that do the replaceWith call on the main nodes. it "works", but it's not the right way to do it, especially because ideally the code for the menu lives in its own view class and doesn't have direct access to the nodes that need to be replaced.
I think it's coming along. If I run into an issue i'll ask a more specific question later, or try a codereview down the road.
a
code review is a great idea! do that whenever you get a chance and we'll look at it