View Single Post
  #21  
Old 09-04-2011, 01:02 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by Emera View Post
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";

Reply With Quote