Thanks. Actually the cast did work. Eclipse gave me warning errors with a cast
that went away after I compiled it. If I had kept the cast in and tried compiling
I would have saved myself some time. Still learning these quirks.
I'll keep your suggestion in mind, just in case.
On Wed, 5 Mar 2014 00:42:05 -0500, Sean Luke <[log in to unmask]> wrote:
>On Mar 4, 2014, at 8:37 PM, Raymond Shpeley <[log in to unmask]>
>> The iterator works fine. Thanks.
>> Now I'm trying to figure out how to get it into integer data form. I'm using
>> ArrayList to hold the terminals after iteration and have tried various casts
>> avail when I want to put one of the terminals into an int.
>Why can't you just say:
>int vals = root.numNodes(GPNode.NODESEARCH_TERMINALS);
>int count = 0;
>Iterator it = root.iterator(GPNode.NODESEARCH_TERMINALS);
> TsERC erc = (TSERC)(it.next());
> vals[count++] = erc.theInteger; // or wherever you stored it