Is there a way to use a variable, string, array key, etc., as a member function? Here's an example:
m.port=CreateObject("roMessagePort")
screen = CreateObject("roGridScreen")
screen.SetMessagePort(m.port)
' Assign the member function names to the array keys,
' and their respective values the array values.
gridAA = {
"SetDisplayMode": "scale-to-fill",
"SetGridStyle": "Flat-Movie"
}
' Issue is right here:
for each gridFunc in gridAA
gridVar = gridAA[gridFunc]
screen.gridFunc(gridVar)
next
As it's written this code is interpreting screen.
gridFunc(gridVar) literally (which obviously won't work), so is there a way to cast
gridFunc(gridVar) as a member function so that it can be called by
screen (which in this case is an roGridScreen object)?