Field Losing Focus? - Correction

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


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
Web site:

----- Original Message -----
From: Dan Friedman <dan at>
To: RunRev Mail List <use-revolution at>
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
> clicks another choice from field 2 and clicks the button?  It's very
> that a user could choose as many as 5 or 6 choices -- in a row -- from
> 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
> a workaround?
> Thanks!
> _______________________________________________
> use-revolution mailing list
> use-revolution at

More information about the use-livecode mailing list