@smith.adriane It works! I’ll write up some notes on usage documentation as I go… This is so great! Thank you!
awesome!
@smith.adriane Is there an example of how to use the basic-components/scrollview
widget? I tried using the test-scrollview
to see if I could figure it out, and I’m getting these errors…
Aug 25, 2020 9:26:33 PM clojure.tools.logging$eval18234$fn__18237 invoke
SEVERE: re-frame: no :event handler registered for: :update
(What I’m really trying to do: I want to put potentially hundreds of lines of text into a scrollable area, without having to create any handlers. Or maybe a textarea? [trying that next…])all the stuff in membrane.basic-components
is meant to work with an alternate state management framework, membrane.component
. so if you're using re-frame, you would have to handle the state yourself
Is there anything equivalent to an HTML textbox, where the scrollbars are managed for you?
membrane.component
and re-frame
both fulfill the same responsibilities
not currently 😞
Got it! Super helpful to know! Thank you, @smith.adriane!
Do you have any examples of how to use a scrollview
` ? 🙂
membrane.ui/scrollview
is purely graphical
in other words, it doesn't provide any default event handlers
all the stuff in membrane.basic-components
is fairly easy to wrap which is what I did to get the textarea to work with re-frame, https://github.com/phronmophobic/membrane/blob/master/src/membrane/re_frame.cljc#L61
if you give me a few moments, I can also wrap the scrollview for re-frame
That would be amazing, @smith.adriane — in the meantime, I’ll study your textarea example. I’m still trying to understand how this all works. I appreciate all this help!!!
the underlying goal is to build a ui framework out of values and pure functions. there's a lot of benefits to going that route, but it means that you can't use the built in components from swing/html/etc that inextricably combine graphics and events
¯\(ツ)/¯
I’ve got to put kids to bed — I will pick this up tomorrow! Exciting! PS: I’m starting to more fully grasp what you’ve created — wow…. I’m blown away that you’ve recreated so much from the ground-up. An amazing achievement!
have a good night. I really do appreciate the feedback!
(And one of these days, I’ve gotta learn what drove you to this length to not just use what Swing/JavaFX give you. It must have really offended/hurt/scarred you!! 😂.
I've wrapped basic-components/scrollview
so you can use it from re-frame. there's an example here, https://github.com/phronmophobic/membrane-re-frame-example/blob/master/src/membrane_re_frame_example/views.clj#L159
I haven't used scrollviews that often, so I haven't put much time into it, but I now have some improvements in mind now that I've thought about it some more