Re: Win32Lib Pixmaps error
- Posted by Lewis Townsend <keroltarr at HOTMAIL.COM> Jul 24, 2000
- 448 views
Hello Matt, Brian, >It looks like your procedure Dress() is passing a zero as its first param >to >setPixMap(), which is id in setPixmap(). Win32lib uses id as a subscript >to >find the handle of the pixmap (within the sequence window_handle), hence >the >subscript error. Looks like the bug is coming from somewhere in your code. >Probably just a typo somewhere. > >Matt Lewis Thanks, yes, it was passing a zero. No, it wasn't a typo but a blatant logic error. Here's the gist of it if any are interested: sequence s for i = 1 to 32 do if first_iteration then s = repeat (0, 32) s [i] = create(pixmap) -- obviously only the first pixmap is set end if setPixmap (s[i]) end for should have been: sequence s for i = 1 to 32 do if first_iteration then s = repeat (0, 32) end if s [i] = create(pixmap) -- obviously only the first pixmap is set setPixmap (s[i]) end for OR sequence s s = repeat (0, 32) for i = 1 to 32 do s [i] = create(pixmap) -- obviously only the first pixmap is set setPixmap (s[i]) end for There was a reason for putting the initialization in the for-loop just not a very good one. Thanks again for all the help. later, Lewis Townsend ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com