From: <72...@in...> - 2003-08-01 10:02:10
|
Hi Vincenzo. Well, I am going to try to explain it. The types are windowOnEvent :: Window a -> [EventId] -> handler -> (Event () -> IO ()) -> IO() unsafeWindowGetHandlerState :: Window a -> EventId -> b -> IO b windowOnEvent takes: the window you want to plug the event handler, a list of constants meaning which events you want this handler to get, the information you want unsafeWindowGetHandlerState returns (usually the handler itself) and the handler you want to plug (you will must use the methods eventXXX in WXH.WxcClasses, and possibly cast the event with objectCast to use methods from derivated classes). The constants for each particular event are defined in WXH.WxcClasses. It is quite fastidious since the help page is more than 1Mb large, and you will need to consult it in order to look for the constants you need. Anyway, I do not know if the constants you need to handle listctrl events have been definited. I have seen some wxEVT_COMMAND_LIST_XXX constants, but I ignore if these ones are for either listctrl or other control, so you will must check the wxwindows events documentation to see it (sorry, I have not at the moment the wxwindows docs, so I cannot check it). unsafeWindowGetHandlerState takes: the window you want to recover the event handler's attached information, the constant that identifies the event, a thing that must be the same type as the stored information you want to recover (the people at wxHaskell puts here default behaviour that skips the event with the function skipCurentEvent, but I do not understand it), and returns the object you stored when you executed windowOnEvent. Bye. PD: By the way, how do you have posted your reply in the thread of my one? I do not know how to do it. Can somebody to explain it to me? --------------------------------------------- Este mensaje lo ha enviado un Alumno de la Universidad de Malaga. http://www.alumnos.uma.es/ |