1. Win32Lib Crash
- Posted by Irv Mullins <irv at ELLIJAY.COM>
Sep 25, 1999
-
Last edited Sep 26, 1999
Hi:
I downloaded the bleeding edge version of Win32lib, and get a crash whenever I
try to scroll thru a listbox using the arrow keys (mouse works ok). Below are
the important parts (I hope) from the ex .err file:
Regards,
Irv
C:\EUPHORIA\INCLUDE\win32lib.ew:9929 in function subclassed()
Select2() needs 1 arguments, not 2
id = 54'6'
hWnd = 14824
iMsg = 257
wParam = 34'"'
lParam = 3243311105
pointer = <no value>
tabKey = <no value>
x = <no value>
y = <no value>
result = <no value>
... called from C:\EUPHORIA\INCLUDE\win32lib.ew:10170 in function WndProc()
hWnd = 14824
iMsg = 257
wParam = 34'"'
lParam = 3243311105
id = 54'6'
event = <no value>
action = <no value>
mouseX = <no value>
mouseY = <no value>
cx = <no value>
cy = <no value>
parms = <no value>
result = <no value>
^^^ call-back from Windows
... called from C:\EUPHORIA\INCLUDE\win32lib.ew:10691 in procedure WinMain()
id = 3
style = 0
hWnd = <no value>
msg = 2333809320
... called from C:\TP7\DISPATCH.EXW:22
<snippity snip>
onKeyUp = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1}
onKeyDown = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1}
<snip sommore>
Traced lines leading up to the failure:
C:\EUPHORIA\INCLUDE\win32lib.ew:10160 if
myReturn[length(myReturn)] != 0 then
C:\EUPHORIA\INCLUDE\win32lib.ew:10167 if window_class[ id ] != WINDOW
then
C:\EUPHORIA\INCLUDE\win32lib.ew:10170 return subclassed(id,
hWnd, iMsg, wParam, lParam)
C:\EUPHORIA\INCLUDE\win32lib.ew:9885 if isTabKey( id, iMsg, wParam,
lParam ) then
C:\EUPHORIA\INCLUDE\win32lib.ew:9558 if (iMsg = WM_KEYDOWN or iMsg =
WM_KEYUP or iMsg = WM_CHAR )
C:\EUPHORIA\INCLUDE\win32lib.ew:9582 return 0
C:\EUPHORIA\INCLUDE\win32lib.ew:9912 if iMsg = WM_KEYDOWN then
C:\EUPHORIA\INCLUDE\win32lib.ew:9920 elsif iMsg = WM_CHAR then
C:\EUPHORIA\INCLUDE\win32lib.ew:9926 elsif iMsg = WM_KEYUP then
C:\EUPHORIA\INCLUDE\win32lib.ew:9927 if onKeyUp[ id ] != - 1
then
C:\EUPHORIA\INCLUDE\win32lib.ew:9929 call_proc( onKeyUp[ id ],
{ wParam, getKeyMasks() } )
C:\EUPHORIA\INCLUDE\win32lib.ew:9852 flags = 0
C:\EUPHORIA\INCLUDE\win32lib.ew:9855 if getKeyState( VK_SHIFT ) then
C:\EUPHORIA\INCLUDE\win32lib.ew:9833 result = c_func( xGetKeyState,
{key} )
C:\EUPHORIA\INCLUDE\win32lib.ew:9836 if floor( result / 2 ) then
C:\EUPHORIA\INCLUDE\win32lib.ew:9839 return False
C:\EUPHORIA\INCLUDE\win32lib.ew:9860 if getKeyState( VK_CONTROL ) then
C:\EUPHORIA\INCLUDE\win32lib.ew:9833 result = c_func( xGetKeyState,
{key} )
C:\EUPHORIA\INCLUDE\win32lib.ew:9836 if floor( result / 2 ) then
C:\EUPHORIA\INCLUDE\win32lib.ew:9839 return False
C:\EUPHORIA\INCLUDE\win32lib.ew:9865 if getKeyState( VK_MENU ) then
C:\EUPHORIA\INCLUDE\win32lib.ew:9833 result = c_func( xGetKeyState,
{key} )
C:\EUPHORIA\INCLUDE\win32lib.ew:9836 if floor( result / 2 ) then
C:\EUPHORIA\INCLUDE\win32lib.ew:9839 return False
C:\EUPHORIA\INCLUDE\win32lib.ew:9869 return flags
2. Re: Win32Lib Crash
Irv Mullins wrote:
>I downloaded the bleeding edge version of Win32lib,
>and get a crash whenever I try to scroll thru a listbox
> using the arrow keys (mouse works ok).
All the onKey routines (onKeyDown, onKeyUp, onKeyPress) now take an
additional 'shift' parameter. Change the parameters to your Select2 routine
to:
procedure Select2( integer keycode, integer shift )
Thanks.
-- David Cuny