The selectedObjects - is it a container or not?
dunbarx
dunbarx at aol.com
Mon Apr 17 16:23:36 EDT 2017
Hi.
If I have three buttons on a card, named "b1", "b2" and "b3", and in the
script of "b3" I have:
on mouseUp
select btn "b1" and btn "b2"
answer the selectedObjects
end mouseUp
I get both selected buttons without issue.. Note this is in v. 6.7.9.
But the "selectedObjects" does not seem to stick very long. Consider these
two handlers:
on mouseUp
select btn "b1" and btn "b2"
repeat with y = 1 to the number of lines of the selectedObjects
put word 1 of line y of the selectedObjects into line y of gg
end repeat
answer gg
end mouseUp
on mouseUp
select btn "b1" and btn "b2"
put the selectedObjects into ff
repeat with y = 1 to the number of lines of ff
put word 1 of line y of the selectedObjects into line y of gg
end repeat
answer gg
end mouseUp
The second one keeps the result of the function. The first one does not.
Craig Newman
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/The-selectedObjects-is-it-a-container-or-not-tp4714040p4714042.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list