I want to create a modal window[1] to ask the user confirmation after selecting a certain menu option; I tried creating a child window, the application froze after closing the child. The code is as follows:
> askConfirmation :: MDIParentFrame a -> IO Bool askConfirmation > parent = do > result <- varCreate False > confirmationWindow result parent varGet result > confirmationWindow :: Var Bool -> MDIParentFrame a -> IO () > confirmationWindow result parent = > do > f <- mdiChildFrame parent [ text := "Confirmation", fontSize := > 15 ] > yes <- button f [ text := "Yes", on command := varSet result > True >> close f] > no <- button f [ text := "No", on command := varSet result > False >> close f] > WXCore.frameCenter f > set f [ layout := column 1 [ label "Are you sure?" > , WXCore.row 10 [ widget yes, widget no ] > ] > ] How can I do this correctly? [1] http://en.wikipedia.org/wiki/Modal_window -- Met vriendelijke groet, Henk-Jan van Tuyl -- http://functor.bamikanarie.com http://Van.Tuyl.eu/ -- ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ wxhaskell-devel mailing list wxhaskell-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel