1. Win32lib integer bug
- Posted by aku saya <akusaya at gmx.net> Oct 11, 2003
- 414 views
Using win32lib version 59.1 Just fixed it by changing line 24160 from function fDoTTN_GETDISPINFO(integer id, atom hWnd, atom wParam, atom lParam) to function fDoTTN_GETDISPINFO(atom id, atom hWnd, atom wParam, atom lParam) I think there have been several errors in win32lib because of the use of integer type. What about changing all integer into atoms, or making a new type such as: type intx(object x) return atom(x) and x >= -2147483648 and x <= 2147483647 and floor(x) = x end type The ex.err file::: c:\euphoria\include\win32lib\Win32lib.ew:24166 in function fDoTTN_GETDISPINFO() type_check failure, id is 1229407553 id = 1229407553 hWnd = 67642 wParam = 128 lParam = 10033840 lText = <no value> hFrom = <no value> lTextLen = <no value> ... called from c:\euphoria\include\win32lib\Win32lib.ew:24375 in function fDoNotify() id = 3 hWnd = 67642 iMsg = 78'N' wParam = 128 lParam = 10033840 pReturn = -2761 lNotify = 9 nid = <no value> lNewMsg = -520 lResult = <no value> ... called from c:\euphoria\include\win32lib\Win32lib.ew:24725 in function MessageProcessor() pSource = -2761 hWnd = 67642 iMsg = 78'N' wParam = 128 lParam = 10033840 id = 3 lHandledEvent = 1 lTemp = <no value> result = <no value> lUserReturn = <no value> ... called from c:\euphoria\include\win32lib\Win32lib.ew:24772 in function WndProc() hWnd = 67642 iMsg = 78'N' wParam = 128 lParam = 10033840 ^^^ call-back from Windows ... called from c:\euphoria\include\win32lib\w32dll.ew:208 in function w32Func() funcid = 59';' parms = {-63365,67758,78'N',128,457028} lRC = <no value> libfunc = <no value> lFuncDef = 83'S' linked = <no value> memset = 0 i = 5 ... called from c:\euphoria\include\win32lib\Win32lib.ew:24737 in function MessageProcessor() pSource = -9987 hWnd = 67758 iMsg = 78'N' wParam = 128 lParam = 457028 id = 114'r' lHandledEvent = 1 lTemp = <no value> result = {-9987} lUserReturn = <no value> ... called from c:\euphoria\include\win32lib\Win32lib.ew:24778 in function SubProc() hWnd = 67758 iMsg = 78'N' wParam = 128 lParam = 457028 ^^^ call-back from Windows ... called from c:\euphoria\include\win32lib\w32dll.ew:279 in procedure w32Proc() funcid = 26 parms = {10007388} libfunc = <no value> lFuncDef = 265 memset = 0 i = 1 ... called from c:\euphoria\include\win32lib\Win32lib.ew:25062 in procedure eventLoop() id = 0 Flag = -1 msg = 10007388 hWnd = 0 getRC = 1 inc = 0 el = 1 lTock = 0 ... called from c:\euphoria\include\win32lib\Win32lib.ew:25206 in procedure WinMain() id = 3 style = 0 lInitFocus = -1
2. Re: Win32lib integer bug
- Posted by Derek Parnell <ddparnell at bigpond.com> Oct 12, 2003
- 405 views
----- Original Message ----- From: "aku saya" <akusaya at gmx.net> To: "EUforum" <EUforum at topica.com> Subject: Win32lib integer bug > > > Using win32lib version 59.1 > > Just fixed it by changing line 24160 > from function fDoTTN_GETDISPINFO(integer id, atom hWnd, atom wParam, atom > lParam) > to function fDoTTN_GETDISPINFO(atom id, atom hWnd, atom wParam, atom lParam) > > I think there have been several errors in win32lib because of the use > of integer type. Not that I'm aware of. Can you indicate where in the library an integer might be a problem? >What about changing all integer into atoms, or making > a new type such as: > > type intx(object x) > return > atom(x) > and x >= -2147483648 and x <= 2147483647 > and floor(x) = x > end type Overkill, in my opinion. > The ex.err file::: > > c:\euphoria\include\win32lib\Win32lib.ew:24166 in function > fDoTTN_GETDISPINFO() > type_check failure, id is 1229407553 > id = 1229407553 > hWnd = 67642 > wParam = 128 > lParam = 10033840 > lText = <no value> > hFrom = <no value> > lTextLen = <no value> This is a weird case. The problem is this statement ... id = getId( wParam ) which I should change so getId() always returns an integer. This is because a control ID can only be an integer and in this case, as it is an atom, I can only guess that something very strange has occurred. In general though, win32lib's use of integer is well behaved. -- Derek