i have created this function in my utils file:
-- used when searching a table as a list function Utils.propertyIn( list, property ) for i = 1, #list do if list[i] == property then return true end end return false end
and it is used in code like this:
if Utils.propertyIn( { plaatje1, plaatje2, plaatje3, plaatje4, plaatje5 }, event.target ) then ... end
though i more commonly use it when i have a dynamic list as opposed to hard-coded values.
myTable = { plaatje1, plaatje2, plaatje3, plaatje4, plaatje5 } if Utils.propertyIn( myTable, event.target ) then ... end
cheers,
dmc