Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!hellgate.utah.edu!dog.ee.lbl.gov!nosc!crash!bruceg From: bruceg@crash.cts.com (Bruce Geerdes) Newsgroups: comp.sys.amiga.programmer Subject: Re: Console device's "Window Bounds Report" buggy? Message-ID: <1991Jun29.001209.14058@crash.cts.com> Date: 29 Jun 91 00:12:09 GMT References: <1991Jun26.025314.9658@crash.cts.com> <22733@cbmvax.commodore.com> Organization: Crash TimeSharing, El Cajon, CA Lines: 21 In article <22733@cbmvax.commodore.com> darren@cbmvax.commodore.com (Darren Greenwald) writes: >In article <1991Jun26.025314.9658@crash.cts.com> bruceg@crash.cts.com (Bruce Geerdes) writes: >>I am writing an all-text program, using the console device. Whenever the >>user resizes the window, I want to reformat the text. So whenever I get a >>NEWSIZE message I send a "window status request" (page 645 RKM Libraries & >>Devices 1.3) to get the current row and column capacity of the window, but it >>always returns the stats of the window's original size, not its current. Has >>anyone here gotten it to work? > >Hmm, I just tried this under 2.0 console.device works fine. Are >you accounting for the fact that the length of the returned string >is variable (e.g., a window with a capacity of 9x9 returns a >shorter string than a window which is 40x40)? I figured out what the problem was. It seems that the console device wants me to send it a SET PAGE LENGTH (0x9B 0x74) and a SET LINE LENGTH (9B 75) every time I want it to recalculate the bounds of the window. Not sending the console these causes it to retain the values of the window when it was originally opened. It may just be me, but the 1.3 RKM didn't make it clear that these commands *had* to be sent every time I wanted info on the window. But it's working. :)