Replies: 4 comments 3 replies
-
|
Hi!
Yes, this is possible, but you'll need to build the infrastructure to do it. There are a few moving parts. Here are some thoughts on how this can be done:
Once you have those bits in place, it should be pretty straightforward to know when to draw the modal window with your form in it, how to dispatch incoming events, and where to put the form's final state once it's validated. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for your reply. But now I'm stuck with the Form type declaration in the application state. When I write
in the definition of the ‘State’ type, I get an error saying ‘ That's why I declared ‘ Is there a specific configuration that needs to be set up (cabal file, pragma, etc.)? I don't see what the exact type of events is. Do you have an example? I feel like I'm going round in circles. I'm sure I'm doing something ‘wrong’, but I can't figure out what it is. I'm still learning a lot about Haskell! Once again, thank you in advance for your help. |
Beta Was this translation helpful? Give feedback.
-
|
Here is an excerpt from the code to help better understand my problem. The “ For the record, I want to display a I tried putting Types declarations Functions |
Beta Was this translation helpful? Give feedback.
-
|
Thank you so much for your help, I understand my mistake now ! And by using “()” as type “e,” everything is back to normal. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I must be doing something wrong. I would like to use Brick.Forms as a modal popup in a “Brick” application, but I can't find anywhere how to do this. Is it even possible?
In the record containing the application status, I include a declaration of the type
field :: forall e. Form FormState e AppResourceName
where FormState represents the type associated with the form data, AppResourceName represents the type associated with resource names, and “e” represents the type of events.
I have created the associated lenses, but I get an error when I “zoom” on the “field” field to process events.
Do you have any idea what is missing?
Thank you in advance, and sorry if this question is not posted in the right place.
Olivier
Translated with DeepL.com (free version)
Beta Was this translation helpful? Give feedback.
All reactions