From: Axel S. <A....@uk...> - 2003-02-27 10:13:26
|
On Thu, Feb 27, 2003 at 10:55:46AM +0100, Nick Name wrote: > On Thu, 27 Feb 2003 09:05:43 +0000 > Axel Simon <A....@uk...> wrote: > > > It > > might be in scope if you import Structs - haven't tried that. > > Yes, I did so. But it didn't work. Maybe 500 is a different value than > priorityDefault? ? I don't understand. I thought it worked. I changed General.chs to export the three priorities. If you update those changes, the following code will run even if you don't explicitly import Structs. As it is, it should work with the current release. I added this as a demo named "concurrent". Axel. import Gtk import Structs import Concurrent main :: IO () main = do initGUI dia <- dialogNew dialogAddButton dia stockButtonClose ResponseClose contain <- dialogGetUpper dia pb <- progressBarNew boxPackStartDefaults contain pb widgetShowAll dia forkIO (doTask pb) idleAdd (yield >> return True) priorityDefault dialogRun dia return () doTask :: ProgressBar -> IO () doTask pb = do progressBarPulse pb threadDelay 1000000 doTask pb |