Oh, nice to know they can be compared directly. How fast is that tho, aka how bad would it be to loop through a list of elements to find the one matching pair?Klonan wrote:Really nameless elements are best for things like labels, frames, flows, holding tables, things that you don't have to listen for directly in events
And what is the actual element.name of an "unnamed" element, is it <1(int)>, <"1"(string)> or just nil?
Also i often use the names of holding tables, flows etc to see what subtable a button belongs too. E.g. if you have two tables with 10 equal buttons each and want to know which of the two tables a button is in, then i can just do something similar to this:
Code: Select all
if event.element.parent.name == 'table1_name' then
--dostuff
else if event.element.parent.name == 'table2_name' then
--dostuff
end
PS: I'm not a moderator but i think that qualifies as "don't double post"