Ways to get the IDs of two already scripted buttons?
Mark Wieder
mwieder at ahsoftware.net
Sun Jan 1 21:45:14 EST 2012
Kresten-
Sunday, January 1, 2012, 3:55:07 PM, you wrote:
> I cannot imagine that something like this should be impossible in livecode
This seems like a prime candidate for a frontscript. The simplest way
might be to use a global variable (warning - untested):
global gSelectedID
put empty into gSelectedID
insert the script of button "xyzzy" into front
answer ...
remove the script of button "xyzzy" from front
if abc is not empty then ...
in button "xyzzy"'s script:
on mouseUp
global gSelectedID
put the id of the target into gSelectedID
if "Answer" is not in the long name of the target then
-- *don't pass mouseUp
else
-- allow mouseUp events in the Answer dialog buttons
pass mouseUp
end if
end mouseUp
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list