On Jul 8, 2007, at 15:37 , D.V. wrote:
Is it possible to have multiple windows in a glade file, and display
only one when the program starts, then show/hide the others as the
need arises ?
You can but it's not well documented.
I found that it was necessary to load the window each time you need
it. (you must re-load the XML each time)
(Just g) <- xmlNewWithRootAndDomain (pathLoad ++ "hwatchmwp.glade")
(Just "vwin")
Nothing
w <- xmlGetWidget g castToDialog "vwin"
(I assume it'll work because it did at program startup. Arguably I
should actually do error checking instead...)
I *think* the right way to handle the close button is the onDelete
(not onDestroy which happens far too late to back out) handler. (I
just noticed that I'm not actually handling it, where I'd thought I
was. Oops.)
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university KF8NH
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe