On 04 Apr 2004, at 12:46, [EMAIL PROTECTED] wrote:

Message: 9
Date: Sun, 4 Apr 2004 12:33:31 +0200
From: Klaus Major <[EMAIL PROTECTED]>
Subject: Re: Getting a field name
To: How to use Revolution <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; format=flowed

Hi Jim,

Here's my problem. A button handler in a palette stack reads:

on mouseup
  answer "Click on the application field." with OK
  if it is empty then exit mouseUP
  wait until the mouseclick
  answer the clickstack --But I want the field name, not the stack
name
end mouseup
...
(Assuming the controls don't overlap.)

There must be a cleaner way.

Try:


...
answer the mousecontrol
## ;-)
...

and/or check "the mousecontrol" before asking.

Hope that helps...

Jim

Regards


Klaus Major
[EMAIL PROTECTED]
www.major-k.de


Using it as suggested is not going to be reliable as it will be empty most of the time.
(on my computer anyway)
Check it with this:


on mouseup
answer "Click on the application field." with OK
if it is empty then exit mouseUP
wait until the mouseclick
if the mousecontrol <> "" then answer the name of me &cr& the name of the mousecontrol
else answer the name of me &cr& "mousecontrol is empty"
end mouseup


A working possibility is:

on mouseup
  if not the uCheckit of me and  not the hilite of me then
    answer "Click on the application field." with OK
    if it is empty then exit mouseUP
    set the ucheckit of me to true
    set the hilite of me to true
    checkforclickedfield
  else
### bug??? if commented out the hilite color stays on (Mac OS X 10.3.3)
    lock screen
    set the uCheckit of me to false
    set the hilite of me to false
  end if
end mouseup

on checkForClickedField
if the mouse is down then
if the mousecontrol is not "" and "field"&&quote is in the name of the mousecontrol then
set the uCheckit of me to false
set the hilite of me to false
answer the name of the mousecontrol
end if
end if
if the uCheckit of me then send checkforclickedfield to me in 50 millisecs
end checkForClickedField


But if the length of the script is a kludge then this is even a greater kludge :^)

Greetings,
WA

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

Reply via email to