1. Win32Lib setHandler() suggestion
- Posted by tone.skoda at siol.net Jun 08, 2002
- 422 views
When you set two event handlers for same control first one is deleted. It would be better and more simple if both would be called when the event happens. This would be especially useful for writing custom controls, like custom drawn treeview. Or is it already working like that? :^)
2. Re: Win32Lib setHandler() suggestion
- Posted by tone.skoda at gmx.net Jun 10, 2002
- 405 views
Thanks, I was using old version. ----- Original Message ----- From: "Derek Parnell" <Derek.Parnell at SYD.RABOBANK.COM> To: "EUforum" <EUforum at topica.com> Subject: RE: Win32Lib setHandler() suggestion > > Tone, > v0.57+ can be used to create a chain of handlers for a control. > > example: > > -- Set a chain of handlers. > setHandler( btn1, w32HClick, routine_id("click_buttons")) > if DebugSwitch = True then > -- add a second routine to be called. > setHandler( btn1, w32HClick, routine_id("Debugger")) > end if > > The routines are called in the same order as they are set. > > To remove the current handler(s) for a control, set it to -1. > > example: > setHandler( btn1, w32HClick, -1) > > To replace the current handler(s) for a control, set it the first one to -1. > > example: > setHandler( btn1, w32HClick, {-1, routine_id("Special_Click")) > > > To add a handler at the beginning of the chain use getHandler first... > > example: > object hl > -- Make sure my handler is installed before any others. > -- First, get the current handlers. > hl = getHandler(myWindow, w32HPaint) > -- Chain mine to the front. > setHandler(myWindow, w32HPaint, -1 & routine_id("mypainter") & hl) > > ----------- > Derek. > > -----Original Message----- > > From: tone.skoda at siol.net [mailto:tone.skoda at siol.net] > > Sent: Sunday, 9 June 2002 11:13 > > To: EUforum > > Subject: Win32Lib setHandler() suggestion > > > > > > > > When you set two event handlers for same control > > first one is deleted. > > It would be better and more simple > > if both would be called > > when the event happens. > > > > This would be especially useful > > for writing custom controls, > > like custom drawn treeview. > > > > Or is it already working like that? :^) > > > > > > > ================================================================== > > > ================================================================== > > > >