jbrave
15 years agoChannel Surfer
objects and functions question
Hi,
I have a function like this:
(really, a huge pile of functions in one object)
I have an array of items which each have an action with the same name as the lable in bigfunc:
what I want to do is to use the value stored in item.action to execute the function when the item is selected, but do it using the lable in the BigFunc array:
this=item[1].action
id=item[1].id
bigfunc.this(id)
it's not working, I'm getting:
Member function not found in BrightScript Component or interface
I tried simplifying and bypassing bigfunc to directly call the function:
this="function1name"
this(id)
but I get:
Member function not found in BrightScript Component or interface.
I can explicitly call bigfunc.lable1(id)
and the function executes.
is there a way to do this without using exec()
- Joel
I have a function like this:
bigfunc=init()
function init() as object
return {label:functionname,lable1:function1name,lable2:function2name}
end function
(really, a huge pile of functions in one object)
I have an array of items which each have an action with the same name as the lable in bigfunc:
item[1].action="lable1"
item[1].id="23423452"
item[2].action="lable2"
item[2].id="23256562"
what I want to do is to use the value stored in item
this=item[1].action
id=item[1].id
bigfunc.this(id)
it's not working, I'm getting:
Member function not found in BrightScript Component or interface
I tried simplifying and bypassing bigfunc to directly call the function:
this="function1name"
this(id)
but I get:
Member function not found in BrightScript Component or interface.
I can explicitly call bigfunc.lable1(id)
and the function executes.
is there a way to do this without using exec()
- Joel