Re: Patch for win32lib v0.60.3
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 15, 2004
- 714 views
Jonas Temple wrote: > > Derek Parnell wrote: > > > > Thanks Jonas. I've located these mistakes now too. > > > > > > The first one is in the queryFont() routine. Find the lines ... > > > > if id = Printer then > > -- use the printer's dc > > useId = Printer > > > > and add this line before them ... > > saved = {} > > > > and these lines after them ... > > > > elsif window_type[id] = Pixmap then > > useId = id > > > > Then find the lines ... > > > > if useId != Printer then > > -- restore the font attributes > > window_font[useId] = saved > > > > and replace them with ... > > > > if length(saved) != 0 then > > -- restore the font attributes > > window_font[useId] = saved > > > > > > The second error is in the trackObject() routine. > > In the routine trackObject() find the lines ... > > > > if heldResource[at][ResOwner] = owner then > > heldResource[at][ResCnt] += 1 > > > > and add after them these lines... > > > > elsif heldResource[at][ResOwner] = -1 then > > -- This resource now has an owner. > > heldResource[at][ResOwner] = owner > > > > Okay, try it now! > > > Derek, > > That took care of those demos. The only other demo that crashed was > childw2. Yeah, I was a but suspicious about that fix. It looked too simplistic. The problem is with queryFont(). I've now made a much better fix but it involved a lot of code changing; too much for a simple patch. So I'll release the fix in v0.60.4 later today, along with a couple of others. -- Derek Parnell Melbourne, Australia