Giter Site home page Giter Site logo

Comments (5)

cgibbard avatar cgibbard commented on July 26, 2024

As an interim until we get something more particular for you to use, you can:

do wv <- askWebView; liftIO . postGUIAsync $ do w <- widgetGetToplevel wv; widgetDestroy w

assuming that you're using GTK.

from reflex-dom.

soenkehahn avatar soenkehahn commented on July 26, 2024

Thanks @cgibbard, that works almost. :)

I created a branch here: https://github.com/soenkehahn/reflex-dom/tree/haltGuiTest. It adds a test-suite to reflex-dom that tests your method of terminating mainWidget. It works most of the time, but hangs when being tried 100 times in a row at some point. (It does so when compiling the test-suite. With runhaskell I have yet to see it hanging.)

from reflex-dom.

cgibbard avatar cgibbard commented on July 26, 2024

Thanks, I'll check it out. We might also want to try throwing in a mainQuit at the end of that recipe. There's a thread which gets created and possibly isn't getting cleaned up too, which I'm somewhat worried about, but one way or another I'll have a cleaner way to shut everything down for you soon.

from reflex-dom.

soenkehahn avatar soenkehahn commented on July 26, 2024

Thanks for looking into this!

(To whem it may concern: I was working on an integration package for servant (https://github.com/haskell-servant/servant) and reflex-dom. You can see my efforts here: https://github.com/soenkehahn/wip-reflex-tests. Due to my problems running a reasonable test-suite it's still very much work-in-progress. And I seem to be running into this issue now and I'm a bit out of ideas: http://permalink.gmane.org/gmane.os.opendarwin.webkit.gtk/2467)

from reflex-dom.

cgibbard avatar cgibbard commented on July 26, 2024

Ah, forgot to leave a comment here, but there's

getQuitWidget :: MonadWidget t m => m (WidgetHost m ())

now, which can be used to obtain an action which should quit the widget in such a way that it can be restarted. (Apologies for the awkward indirection, it helps the type system work out what the WidgetHost monad is.)

from reflex-dom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.