1. [WIN] Bug in win32libv0_53???
- Posted by Ray Smith <smithr at IX.NET.AU> Oct 29, 2000
- 402 views
- Last edited Oct 30, 2000
Hi There, I seem to have a bug in win32libv0_53 with multi-windows. I have an app with two windows, when either window looses focus, and either window gains focus again it crashes with a "This program has caused an illegal opperation and will be closed down.." I wrote a cut down version to try to locate the error and it seems to appear if the second window has a control on it (say a pushbutton), if the sub window doesn't have any controls then the bug doesn't appear to occur. See attached demo program: Note: by commenting the two lines that create a control on the second window removes the bug. ------------------------------ -- -- Test win32libv0_53 bug with multi forms -- Ray Smith 30/10/2000 with trace with type_check without warning include win32lib.ew -- main window constant frmMain = create(Window, "Test Windows", 0, Default,Default,580,400, or_all({WS_DLGFRAME, WS_SYSMENU, WS_MINIMIZEBOX})), butShowSub = create(PushButton, "&Sub Window", frmMain, 440, 180, 100, 25, 0) -- sub window constant frmSubWindow = create(Window, "Sub Window", 0, Default,Default, 450,350, or_all({WS_DLGFRAME, WS_SYSMENU})) -- comment following two lines and bug disappears constant butDummy = create(PushButton, "&Dummy", frmSubWindow, 140, 80, 100, 25, 0) procedure click_sub_window() -- open sub window openWindow(frmSubWindow, Modal) end procedure onClick[butShowSub] = routine_id("click_sub_window") -- start win32lib WinMain( frmMain, Normal ) ------------------------------- Run the program, click the "sub window" button, now click on the first window again, and the error occurs. Remove the pushbutton from the second window and the error doesn't occur. Win32Lib is looking really good, I haven't played with it for about a year, and it has improved greatly. I am using the toolbars, status bar, rich edit, and blit functions.\, fantastic!. Regards, Ray Smith
2. Re: [WIN] Bug in win32libv0_53???
- Posted by Derek Parnell <derekp at solace.com.au> Oct 30, 2000
- 388 views
Hi Ray, > >I seem to have a bug in win32libv0_53 with multi-windows. Yes, there is a bug with modal windows. If you open them as Normal there is no crash. This has been fixed in v0.54. I *really* hope to get this release out tonight. There were some last minute documentation problems and I'm trying a new way to gracefully degrade obsoleted features. I've decided to NOT rename some routines in a manner which would mean a potential nightmare for some coders. Instead, I've come up with a naming system that does not force code changes (yet). For example, this means that getSize() and getExtent() will not swap meanings now. ----- cheers, Derek Parnell