Field Losing Focus?

Ken Ray kray at sonsothunder.com
Mon Aug 12 19:08:01 EDT 2002


Following on Rob's coattails, here's an example:

-- Field 1 Script
on mouseUp
  put word 2 of the selectedChunk into the selChar of me
end mouseUp

-- Button Script
on mouseUp
  put the hilitedText of field 2 after char (the selChar of fld 1) of fld 1
end mouseUp

Hope this helps,

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


----- Original Message -----
From: Rob Cozens <rcozens at pon.net>
To: <use-revolution at lists.runrev.com>
Sent: Monday, August 12, 2002 5:37 PM
Subject: Re: Field Losing Focus?


> >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)
> _______________________________________________
> 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