On 04 Apr 2004, at 07:15, [EMAIL PROTECTED] wrote:

Message: 5
Date: Sat, 3 Apr 2004 18:06:49 -0800
From: Jim Hurley <[EMAIL PROTECTED]>
Subject: Re: Getting a field name
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii" ; format="flowed"



snip


Well, I found a way, but it is a kludge:

on mouseup
   answer "Click on the field to use." with OK
   wait until the mouseclick
   put the clickloc into tLoc
   put the clickstack into tStackName
   repeat with i = 1 to the number of controls in tStackName
     if tloc is within the rect of control i of  tStackName then
       put the  name of control i of tStackName into theClickControl
       exit repeat
     end if
   end repeat
   put theClickControl into field theFieldName
end mouseup


(Assuming the controls don't overlap.)


There must be a cleaner way.



Your idea is not really a kludge. But instead of :

repeat with i = 1 to the number of controls in tStackName

you can:


on mouseup
answer "Click on the application field." with OK
if it is empty then exit mouseUP
--set the hilite of me to true
put "" into tAnswer
wait until the mouseclick
repeat with i = 1 to the number of flds on this cd
if the mouseloc is within the rect of field i then put the long name of fld i into tAnswer
end repeat
if tAnswer is "" then put "no field clicked" into tAnswer
--set the hilite of me to false
answer tAnswer
end mouseup


To be able to use the target or the mousecontrol, you have to do it differently.

Greetings,
WA

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to