membrane

https://github.com/phronmophobic/membrane
genekim 2020-08-26T04:16:04.007500Z

@smith.adriane It works! I’ll write up some notes on usage documentation as I go… This is so great! Thank you!

phronmophobic 2020-08-26T04:16:29.007900Z

awesome!

genekim 2020-08-26T04:32:12.010200Z

@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…])

phronmophobic 2020-08-26T04:35:58.012800Z

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

genekim 2020-08-26T04:36:55.014100Z

Is there anything equivalent to an HTML textbox, where the scrollbars are managed for you?

phronmophobic 2020-08-26T04:36:57.014200Z

membrane.component and re-frame both fulfill the same responsibilities

phronmophobic 2020-08-26T04:37:37.014400Z

not currently 😞

genekim 2020-08-26T04:38:12.015300Z

Got it! Super helpful to know! Thank you, @smith.adriane!

genekim 2020-08-26T04:39:50.016200Z

Do you have any examples of how to use a scrollview` ? 🙂

phronmophobic 2020-08-26T04:40:41.017Z

membrane.ui/scrollview is purely graphical

phronmophobic 2020-08-26T04:41:04.017400Z

in other words, it doesn't provide any default event handlers

phronmophobic 2020-08-26T04:44:14.018100Z

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

phronmophobic 2020-08-26T04:44:48.018800Z

if you give me a few moments, I can also wrap the scrollview for re-frame

genekim 2020-08-26T04:46:53.019500Z

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!!!

phronmophobic 2020-08-26T04:49:18.021Z

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

phronmophobic 2020-08-26T04:49:31.021100Z

¯\(ツ)

genekim 2020-08-26T04:55:58.022600Z

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!

phronmophobic 2020-08-26T04:56:22.023300Z

have a good night. I really do appreciate the feedback!

genekim 2020-08-26T04:59:16.025100Z

(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!! 😂.

😁 1
phronmophobic 2020-08-26T16:00:07.026100Z

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

phronmophobic 2020-08-26T16:01:57.027500Z

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