Field Losing Focus? - Correction

Ken Ray kray at sonsothunder.com
Tue Aug 13 10:24:15 EDT 2002


Dan,

If you want to update the insertion location, you can change the script of
the button to this:

on mouseUp
   put the hilitedText of field 2 into tText
   put tText after char (the selChar of fld 1) of fld 1
   set the selChar of fld 1 to ((the selChar of fld 1) + length(tText))
 end mouseUp

It's not an optimal solution, but you can't have selections in two fields
(an insertion point in one and a selected chunk of text in another), so you
have to "fake it" somehow. My suggestion would be to use some kind of
graphic character as a fake insertion point in field 1 triggered on the
mouseLeave and on the resetting of the selChar in the button so it doesn't
look like there is no insertion point in field 1.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web site: http://www.sonsothunder.com/

----- Original Message -----
From: Dan Friedman <dan at clearvisiontech.com>
To: RunRev Mail List <use-revolution at lists.runrev.com>
Sent: Monday, August 12, 2002 6:32 PM
Subject: Re: Field Losing Focus? - Correction


> This is a good workaround.  However, it doesn't completely solve the
> problem...
>
> If your typing in field 1, then click a choice in field 2 and click the
> button, under your scenario it should work.  What happens when the user
then
> clicks another choice from field 2 and clicks the button?  It's very
likely
> that a user could choose as many as 5 or 6 choices -- in a row -- from
field
> 2.  Do you really think that maintaining the location of the cursor is the
> best solution?
>
> Do I not understand the "traversalOn" property?  Shouldn't this work
without
> a workaround?
>
> Thanks!
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the Use-livecode mailing list