Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!cmcl2!lanl!dlc From: dlc@lanl.ARPA (Dale Carstensen) Newsgroups: net.micro.mac Subject: Re: TextEdit Bugs Message-ID: <7607@lanl.ARPA> Date: Wed, 17-Sep-86 23:15:57 EDT Article-I.D.: lanl.7607 Posted: Wed Sep 17 23:15:57 1986 Date-Received: Fri, 19-Sep-86 22:25:00 EDT References: <261@uwmacc.UUCP> Distribution: net Organization: Los Alamos National Laboratory Lines: 25 > > From: > From: dubois@uwmacc.UUCP (Bill Winkle @ Brain-Dead Software) The above two discussed keeping the TextEdit caret in the visible window when the caret is on the last line of the TE text. A simpler way to locate the caret exists. A TERec field named selRect is a Rect which contains the caret when no selection is active (selStart is the same as selEnd). So all that needs to be done to make sure the caret is in the visible window, is to make sure that Rect is in the visible window. A lot of consideration of font size parameters is also not necessary. Unfortunately, IM doesn't say much about selRect. There are some strange special values that appear in it. So, to figure out how to write your program, you need to do a lot of peering at selRect with MacsBug or something that displays it independently. I think I did a fair job in the Aztec C version of SKEL that I submitted to info-mac, available in the Sumex archives. Anything that keeps track of rectangle coordinates for scrolling in windows can be confusing, so expect to have to think really hard about how to write your scrolling routines, and expect a few surprises from the trap handlers. Dale Carstensen dlc@lanl.arpa {cmcl2|ihnp4}!lanl!dlc.uucp