Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!tut.cis.ohio-state.edu!ucbvax!qt.ipa.fhg.de!mai From: mai@qt.ipa.fhg.de (Christoph Mai) Newsgroups: comp.soft-sys.andrew Subject: problems with textview_FindLineNumber... Message-ID: Date: 13 Dec 90 10:41:02 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 33 I got the following problem: After having inserted a certain amount of characters in a textobject I want to know from the corresponding textview how many additional lines had to be brought up therefore. Here's in short what I'm doing: tView is the textview and t the associated textobject, buf is a char-pointer to the inserted string, insertPos the insert position and length the strlen(buf): { ... oldlines = textview_FindLineNumber(tView,insertPos); text_AlwaysInsertCharacters(t,insertPos,buf,length); newlines = textview_FindLineNumber(tView,insertPos+length); numberOfNewLines = (newlines - oldlines); ... } But this doesn't work as textview_FindLineNumber returns (as for my part!) strange values. Has anybody got an idea how to get along or perhaps can tell me what this method really returns? Thanks in advance, Christoph ____________________________________________________________ Christoph Mai (chm@qt.IPA.FhG.de) Fraunhofer-Institut f. Produktionstechnik u. Automatisierung Eierstrasse 46,D-7000 Stuttgart 1