[futurebasic] Re: [FB] Munger experts. Help.

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1999 : Group Archive : Group : All Groups

From: "Pixmix (micronet)" <pixmix@...>
Date: Tue, 21 Sep 1999 14:13:53 +0200
Pierre Zippi wrote:

> Pixmix (micronet) wrote:
> > Pierre,
> > A piece of code would help.
> > Maybe you are sending the extra length byte of the pascal string to the Munger
> > function, or maybe your handle is not unlocked.
> > Don't know if this helps...
> Alain
> Problem restated:
> It works perfectly as long as the find$ and replace$ are equal in length.
> However, when the length find$ and replace$ are unequal the last characters of
> the text handle are altered by a length = to the difference between the find$
> and replace$ times the number of changes made.
> Here is some sample code:



The handle is indeed resized, it seems, on the other hand, that the field teLength in
the textEdit record is not.
efHandle& = TEHANDLE(1)
length% = efHandle&..teLength%

length% doesn't equal the size of the text handle.

I tried to poke the new size in that field like this:

    % [efH&]+_teLength,x%

to no avail.

Once again, I would be interested to see your code corrected and working. Sorry, I
have little time to keep on searching, cos' I'm on the heavy work of FB^3
translation. Another suggestion, maybe you should try to work with a copy of the
original text handle, then put that copy back into the edit field.