From: Mauricio <bri...@ya...> - 2009-01-20 21:01:59
|
>>>> I'm using a file chooser dialog that works >>>> well, except when I set an IO () to be called >>>> at idle time (...) >>> It sounds like you're doing the right thing. So if you add a putStr >>> statement to the handler (...) >> Interesting: instead of adding, I replaced labelSetMarkup >> with putStrLn "Eu aqui.", it does print, and I still see >> the problem, (...) >> --- >> verificaçãoPeriódica <- return $ do { >> putStrLn "Eu aqui." ; >> return True >> } ; >> idleAdd verificaçãoPeriódica priorityDefaultIdle ; >> --- > Ok, then I don't understand what your "problem" is. I assumed that > the label does not get updated but the dialog works fine. Is that the > case? No, sorry for not beeing clear. In the piece of code above (which doesn't use the label), if I remove the 'idleAdd' line (and so 'verificaçãoPeriódica' is not called when system is idle) the dialog works fine, but if I keep it, the dialog doesn't work. (It shows up, I can push cancel or press ESC to leave it, but it doesn't allow me to select files and change the mouse cursor to a wait icon.) Since 'idleAdd' seems to be from glib and 'verificaçãoPeriódica' does no Gtk, I don't understand how it interfears with the dialog. 15 years ago, I did some Microsoft Windows programming, and idle time used to be notified using a message sent to a message queue that also received messages regarding windows and keyboard. Dialogs replaced that queue while they were running. Does Gtk work like that? Would a message queue be a "meeting point" between my idle function and dialog behavior? Maurício |