Field Losing Focus?

Rob Cozens rcozens at pon.net
Mon Aug 12 18:41:00 EDT 2002


>Now, I want the text from field 2 to be placed into field 1 at the location
>of the cursor.  In the button's script, I have this:
>
>on mouseUp
>   focus on field 1
>   put word 2 of the selectedChunk into tChar
>   put the hilitedText of field 2 into tText
>   put tText after char tChar of field 1
>end mouseUp
>
>This works fine if you don't click in field 2.  As soon as you click in
>field 2, the selectedChunk  is empty.
>
>...
>Anyone have any ideas?

Hi Dan,

How about storing the field 1 selection on mouseUp and retrieving it 
in field 2's mouseUp?  You could store it in a variable declared 
local to both mouseUp handlers or in a custom property.
-- 

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)



More information about the use-livecode mailing list