I'm really getting problems with my attachements.

/john
import Graphics.UI.Gtk      (initGUI)
import System.GIO
import Data.ByteString.UTF8 as UTF8
import Control.Concurrent   (threadDelay)

sleep :: Int -> IO ()
sleep = threadDelay . (1000000*)

foo = do
        let file = fileFromPath (UTF8.fromString "/")
        info <- fileQueryInfo file "standard::name" [] Nothing

        let maybeName = fileInfoGetName info
        maybe (putStrLn "N/A")
              (print . UTF8.toString)
              maybeName

main = do
        -- init Glib type system
        initGUI

        -- Play with GIO
        foo

        -- Give some time to GC
        sleep 1

        -- Replay (most of the time the program will crash before)
        foo
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to