I'm trying to dynamically call a method on an event but I get an error saying: "Array operation attempted on variable not DIM'd. (runtime error &he7) in xyz"
This methodology works fine for my roAssociativeArrays, but doesn't seem to work on the actual events broadcast from the remote. Is there a way to dynamically execute a method that exists on an event?
m.events = ["ListItemFocused", "ListItemSelected"] 'arbitrary events for sake of example
for each event in m.events
checkName = "is" + event
handlerName = "on" + event
if msg <> invalid and msg[checkName] then
print "Success."
m[handlerName](msg)
end if
end for
Note: This works manually like below.. but it's why I use the `msg[xyz]()` that fails.
' ordinarily, this would work, and that's great.. but not what I'm trying to achieve
'if msg.isScreenClosed() then
' m.onScreenClosed(msg)
'end if