info-mac@uw-beaver (info-mac) (07/04/84)
From: Mark H. Nodine <mnodine@BBNH.ARPA> I have been using the SUMacC development system and am working on library routines for I/O which simulate unix I/O. The aim is to be able to take any c program, add an initialization routine at the top, and get it to run on the mac. However, I am having a problem with I/O to stdin and stdout. The idea is to create a window in the initialization routine which gets bound to stdin and stdout. When you get to the bottom of the window, you would like for it to be able to scroll automatically (otherwise you can't see what's being typed any more). To do this, I have been calling TEScroll, which does in fact scroll correctly. The problem comes with determining when to call TEScroll. My original thought was to look in the TERecord and add together the first baseline with the (line height times number of lines) and see if this is greater than the bottom of the view rectangle. The problem is that when I call TEScroll, is somehow scrolls the text without changing any of these fields, so I immediately think I have to scroll again... Can anybody tell me what TEScroll actually does change, so I can get a better handle on this problem? Thanks, Mark