[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] off topic: objc_edit() problem



> I'm trying to allow the use of the mouse to position the text cursor
> within an editable text field.  It almost works, I can click a char
> within a text field and if I type a char it indeed appears where it
> should.  However the AES does not position the cursor correctly, it
> seems to always appear at the end of the field regardless.  Does
> anyone here know if objc_edit() is faulty?  I am using Naes for my
> testing.

objc_edit() is okay.

You have to find the tedinfo structure address for your editable object and
(assuming `ted' is the TEDINFO pointer) do the following:

ted->te_txtlen = ted->te_tmplen;

In other words, you have to copy the template length into the text length.

You do this once, directly after rsrc_load().

This should fix the problem.

--
CVV
Konrad M.Kokoszkiewicz, http://draco.atari.org

** Ea natura multitudinis est, aut seruit humiliter, aut superbe dominatur.
** Taka to juz natura pospólstwa, albo sluzalczo sie plaszczy,
** albo bezczelnie sie panoszy. (T. Liuius XXIV, 25).