Quote:
Originally Posted by Emera
As you can see I am using a function to add the rows to the TextList Control. I was wondering how I could include the usage of variables in the function called UpdateClassList();
|
using addrow returns the row object upon creation, however, I imagine this doesn't even work since you aren't referencing an object to add the rows to.
In the function, you either need to encompass all the addrows within a with statement:
PHP Code:
with(NameOfTextListObjectHere){
}
or prefix every instance of addrow with the name of the object.
The first is probably easier.
In terms of adding a variable to the row object, addrow returns the row object upon being invoked. If you only want to add one variable to the row, calling
PHP Code:
addrow(id, "Archer").classStats = {"your", "data", "here"};
is perfectly fine.
Otherwise, encompass the addrow within a with statement.
PHP Code:
with(addrow(id, "Archer")){
classStats1 = "your";
classStats2 = "data";
classStats3 = "here";
}