mr/reactive-banana-gi-gtk

Dynamically Created Widgets

Opened this issue · 1 comments

Can you provide an example on how to dynamically add (and remove) widgets based on a widget event with their own events?
I've looked into using a toggle button event to a function which would toggle between create and destroy of a widget toggleFun :: (MomentIO (Maybe Button) -> MomentIO (Maybe Button))
with accumE (return Nothing) (toggleFun <$ toggleActivateE) with execute but got unexpected results.
How would I remove the event signals when destroying the widget?

mr commented

Not sure, but I haven't really tried it either. The library is very experimental so it'll might take a little creativity to get something working. If I have time I may take a look but in the meantime you're welcome to poke around the source, it's not very large.