Author Topic: ArrayList capacity  (Read 811 times)

I've been using Trace's arraylist implementation (here) but for some reason it doesn't store more than 10 items at once and I have no idea why.

I've never actually used it so I can't guarantee this will work, but try using this code to spawn an ArrayList

new scriptObject(myArrayList) {
    class=ArrayList;
    initialCapacity=55;
};
« Last Edit: August 19, 2013, 12:18:53 PM by $trinick »

I've never actually used it so I can't guarantee this will work, but try using this code to spawn an ArrayList

new scriptObject(myArrayList) {
    class=ArrayList;
    initialCapacity=55;
};
How would I manipulate this arraylist?
would it be $myArrayList?

How would I manipulate this arraylist?
would it be $myArrayList?
It'd be an object named myArrayList, so you wouldn't use the dollar sign. It's not a global variable, that's just its name.

You'd do myArrayList.whatever();


Although, if you don't you aren't comfortable with doing it that way, you can do this.
Code: [Select]
$myArrayList = new ScriptObject()