site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com I am chasing an odd problem with drawing the insertion point in an instance of NSTextView. I don't have enough information to know whether it is my bug or Apple's, much less to know what the problem is. I wondered if anyone on this list might have some useful ideas or clues. I am using XCode 2.4.1, developing and running on a Macbook under OS 10.4.9. I first noticed the problem while still using 10.4.8. I am developing a Cocoa application in which, in one instance of NSTextView, the insertion point ceases to be drawn after various operations on the text (details in a minute). By subclassing NSTextView and reimplementing "drawInsertionPointInRect:color:turnedOn:" in the subclass, and then instrumenting it with printf statements to the console log, I have discovered that ... o What happens "normally", is that some entity calls "drawInsertionPointInRect:color:turnedOn:" every half second, with the boolean associated with "turnedOn:" alternating between YES and NO. o When my problem occurs, the calls to "drawInsertionPointInRect:color:turnedOn:" occur only once per second, and with the boolean associated with "turnedOn:" always NO. That is, superficially, it looks as if every other call to this method is either not being made or is being misdirected. o The method "shouldDrawInsertionPoint" returns YES at all times, as it should, and o When I implement a horrendous hack, using a static boolean in my reimplementation of "drawInsertionPointInRect:color:turnedOn:" that gets toggled on every call, and passing that boolean on to "super" as the argument associated with "turnedOn:", then lo and behold, the cursor appears right where it ought to be, blinking as it should, except at only half the normal frequency (as is expected from using a static boolean toggled in this way). o The problem seems to occur only when the user of the application is editing text in the last (bottom-most) line of the NSTextView, and when that line of text is not blank. I have no sense whether this means something or is a red herring. If I could fix this one I would be delighted, or if I could narrow it down to something I could convincingly argue was an Apple bug, I would file it, but I haven't much of a clue how to proceed. Any other suggestions? Thanks ... -- Jay Reynolds Freeman --------------------- Jay_Reynolds_Freeman@mac.com http://web.mac.com/jay_reynolds_freeman (personal web site) _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Does anyone know what it is that calls the method "drawInsertionPointInRect:color:turnedOn:" in normal operation? This email sent to site_archiver@lists.apple.com