Re: Win32Lib please fix msg handler
- Posted by Derek Parnell <dparnell at BIGPOND.NET.AU> Sep 06, 2000
- 438 views
Ok, it'll go into the next bleeding edge build - I'll work on this today. If anyone has a better idea to solve this let me know. --- cheers, Derek ----- Original Message ----- From: "Al Getz" <xaxo at AOL.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Wednesday, September 06, 2000 6:01 AM Subject: Win32Lib please fix msg handler > in win32lib: > > START CODE QUOTE: > -- user can process events that Win32Lib doesn't have handlers for. > if onEvent[ id ] > 0 then > -- call routine > call_proc( onEvent[ id ], {iMsg, wParam, lParam} ) --why not a function? > > -- NEW! 0.41 allow user to override > if myReturn[length(myReturn)] != 0 then > return popSelf() > end if > :END CODE QUOTE > > The problem is, an event handler often has to return a value of 0 to tell > Windows it is processing the event. Since 'popSelf()' only happens > with non-zero values, its impossible to override without > modifying the win32lib file. > > How about fixing that in your various versions? > The simplest is: > > if onEvent[id]>0 then > retv={0,0} > retv=call_func(onEvent[id],{iMsg,wParam,lParam}) > if retv[1]>0 then > return retv[2] > end if > > If you want to stick with the current method, make each ret stack > member a two dimensional value: > {0,0} > the first value indicating whether or not to return the second value. > > This is a fairly important functionality! > > Thanks, > Al