How to send actions between components? - reason

The documentation explains how to send an action to self however I can't find how to send an action to another component. Right now I'm putting all of my app in a single big reducerComponent but I'd really like to be able to have a menu component with some buttons and an other component for the main game area and have the buttons change the state of the main game area.

It's very similar to React and well described in Thinking in React as
React is all about one-way data flow down the component hierarchy. It may not be immediately clear which component should own what state. This is often the most challenging part for newcomers to understand...
You should pass both handler and the state down to children from parent components. Good example can be found here.

Related

Msft MRTK3 on Unity for HoloLens 2 - Object Manipulator feature overrides button clickable/pressable functions. Why?

I am trying to design a UI panel using MRKT3 for the HoloLens 2. It is a panel with pressable buttons. Anytime I add object manipulator script (to make panel grabbable, interactable, etc.) this unfortunately seems to make my buttons no longer clickable.
How can i go about this?
Inspector with Object Manipulator included
For the issue reported, what is likely happening is the button is getting the parent attributes applied via inheritance. From the image, one cannot see the code or relationship but that is what sounds like in the post.
If you have the pressable button to be the parent and underlying objects under it, that should work.

How can i make the buttons on my sideabar switch tabs?

I have a UI with 4 buttons on a sidebar I made and I have no clue how I can set it so when you press it, it shows a different screen.
I do not need it to open a new window just so it can change between 4-5 "modes"
I am using Bunifu UI
I just took a quick look at the Buniforms reference docs for their WinForms product (I assume you are using their WinForms product) and it look like you want to use the "Transitions" component
https://devtools.bunifu.co.ke/bunifu-ui-winforms-docs/#bunifu-transition
"Bunifu Transition is a special component, that allows us to have transitions in our Windows Forms apps. This is an amazing feature of Bunifu Framework, because it makes our User Interfaces more interactive and improves massively the User Experience. Let’s see how!"
"Bunifu Transition allows us to apply transitions to other controls."

Build some sort of workflow in JavaFX

I'm trying to build some sort of visual workflow in JavaFX. I want my application to have one main screen with the next and previous buttons, something like an installer. When a user clicks next, all the elements of the next screen appear in the same element. All previous choices of the user have to be saved. So when a user clicks on the previous button that all of his choices are still there.
How would I go on to do this?
I found these links on Google, but they don't seem to help me. Something like this is a bit the direction that I want to go, but the code in this tutorial isnt't really that good for scene's with a lot of elements.
The DataFX Framework provides a Flow API that can be used to define workflows. By doing so you can simply navigate between MVC Groups by only using annotations or configurations. You can find some examples of the API here:
http://www.guigarage.com/2014/06/datafx-tutorial-5/
http://www.guigarage.com/2015/02/quick-overview-datafx-mvc-flow-api/
http://www.guigarage.com/2015/01/datafx-tutorial-6/
I haven't worked with JavaFX in a while, but I'll start by saying I really hope you are using the JavaFX scene builder.
The way I would do it off the top of my head without going back and relearning JavaFX is to create a main window in the scene builder, and have a sort of central content display area, which holds another custom JavaFX container that contains the content you want to display, of which you can then create several of and swap out which one is being displayed programmatically.
Basically, create several smaller components representing each step or screen and display them programmatically in an owning container.

Programmatically select menu item for mvvm prism application using Telerik RadMenu

Hello I have a prism/mvvm style application and am using the RadMenu control. I also have a view/view model pair in one project and another view/view model pair for my RadMenu control in another project. Basically I would like to use the event aggregator to send an event to the view model for the RadMenu (the view model that is paired with the view that the RadMenu sits inside of). So that the RadMenu's view model can notify the RadMenu to switch to a different RadMenuItem programmatically. I think I can use a blend behavior to contain the behavior I'm looking to reproduce, but I cannot find a method in the RadMenu that will allow me to programmatically select a specific menu item.
If the control does not support this now, is there a work around? Thanks.
I believe this is a missunderstanding. As far as I know there is no selection on the RadMenu. You can only Check or Uncheck Items in your Menus. Are you trying to emulate a user clicking on a specific item just to trigger the functionality behind the menu-item? If that's the case I would propose another way and directly handle the EA-Message in the ViewModel. You can trigger the code from there then. If you're doing MVVM the logic behind the menu-items is implented in your VM anyways. :)

GWT Activity - Places => DialogBox?

I'm trying to use the GWT Activity & Place model, but I'm having some
troubles with it about how to use my activities.
I've got a LoginActivity which drives the user to another activity :
DemandsActivity.
My DemandsActivity manages a view ("DemandsView") which displays a
simple list of demands (with a CellTable).
The whole works fine.
I would like to be able to show the details of a demand, from a
selected line of my cellTable, by displaying
a DialogBox with the informations.
I thought I could use one more
activity to do that : DemandDetailsActivity.
But I don't know how to do that.
Or I've been wrong from the beginning. Maybe should I put several presenters (displays) into my activity ? One presenter to display my CellTable, and another one to display a selected element of my CellTable in a DialogBox, without changing Place ?
What do you think of that ?
Thanks
What you are trying to do is called master-detail view. People have been implementing it with GWT, just google around.
On a side note: in MVP parlance Activities are presenters and Views are displays, so when you say put several presenters (displays) into my activity it really makes no sense.
Presenters should correspond to a place and handle business logic. They should not be concerned with the display part. And they should be testable, which means they should run on desktop/server JRE without GWT client dependencies.
So, all the GUI building part should be inside Views. And, yes, you could have multiple Views per Activity if this makes sense. BUt, personally, I'd go with one View that shows details (possibly dialog) when Activity instructs it to.
You should normally have a one to one relationship between Places and Activities but you may have many Views per a given Activity. In the project I'm currently working on we create an interface per Presenter and its associated View and then have our Activities implement any Presenters for the Views it needs to display.