Article View: comp.soft-sys.andrew
Article #1286problems with textview_FindLineNumber...
From: Christoph Mai
Date: Thu, 13 Dec 1990 10:41
Date: Thu, 13 Dec 1990 10:41
33 lines
1444 bytes
1444 bytes
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
Technical Details
Message-ID:
<wbNpeyA_8000Q9cmVV@libby>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!tut.cis.ohio-state.edu!ucbvax!qt.ipa.fhg.de!maiShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <wbNpeyA_8000Q9cmVV@libby> Date: 13 Dec 90 10:41:02 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 33