re-Bonjour List,
looks like my segfault comes from another part of the code :
I wanted to clear stuff when user closes the top window, so I had this
[...]
set dlg [ on closing := closeApp img
, on focus := appFocus ref ]
[...]
closeApp img = do
closeImage img
But now when I press close, nothing seems to happen and the program
doesn't quit.
So I modified it to
[...]
set dlg [ on closing := closeApp dlg img
, on focus := appFocus ref ]
[...]
closeApp dlg img = do
closeImage img
close dlg
and now it segfaults when I try to close the top window.
I hope I'm not polluting the list with all the posts.
David.
2011/9/12 D.V. <[email protected]>:
> Bonjour List,
>
> Thanks to Jeremy O'Donoghue's blog about events, I copied and modified
> two functions; but without really understanding what's going on :
>
> windowOnIconize :: Window a -> IO () -> IO ()
> windowOnIconize win eventHandler
> = windowOnEvent win [wxEVT_ICONIZE] eventHandler (\evt -> eventHandler)
>
> windowGetOnIconize :: Window a -> IO (IO ())
> windowGetOnIconize win
> = unsafeWindowGetHandlerState win wxEVT_ICONIZE skipCurrentEvent
>
> and then somewhere I added:
>
> windowOnIconize win $ putStrLn "Iconize!!!!"
>
> But I've no idea how/where to use the windowGetOnIconize function...
>
> Now when I try the program, I get the Iconize!!!! message when I
> (de-)iconize the window, which is great, but I segfault when I close
> the window.
>
> David.
>
> 2011/9/9 D.V. <[email protected]>:
>> 2011/9/9 D.V. <[email protected]>:
>>> Bonjour List,
>>
>>> I'm continuing the search, but if someone has an idea, I'm interested !
>>
>> Looks like it's called Iconize in wxWidget slang, but now all I've
>> found with Iconize is
>>
>> Graphics.UI.WXCore.WxcClassTypes type IconizeEvent a = Event (CIconizeEvent
>> a)
>> Graphics.UI.WXCore.WxcClassTypes data CIconizeEvent a
>> Graphics.UI.WXCore.WxcClassInfo classIconizeEvent :: ClassType (IconizeEvent
>> ())
>> Graphics.UI.WXCore.WxcClassInfo downcastIconizeEvent :: IconizeEvent a
>> -> IconizeEvent ()
>> Graphics.UI.WXCore.WxcClassTypes type TIconizeEvent a = TEvent
>> (CIconizeEvent a)
>> Graphics.UI.WXCore.WxcClassesMZ topLevelWindowIconize ::
>> TopLevelWindow a -> Bool -> IO Bool
>> Graphics.UI.WXCore.WxcClassesMZ topLevelWindowIsIconized ::
>> TopLevelWindow a -> IO Bool
>> Graphics.UI.WXCore.WxcClassesMZ wxEVT_ICONIZE :: EventId
>> Graphics.UI.WXCore.WxcDefs wxICONIZE :: Int
>>
>> I'm not sure how to work with events in wxCore..
>>
>> David.
>>
>
------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops? How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
wxhaskell-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users