PDA

View Full Version : Scripting Question for Lists


lunarboy1
9th November 2001, 23:29
how come doing this won't work?



alist = new list;
alist.addItem( "Apple Pie" );
alist.addItem( "Cherry Pie" );
alist.addItem( "Grape Pie" );

String s = alist.enumItem( 1 );


how come s equals some funky characters and not a full string? Is there anything different with lists that is special that I should know about? I'm used to using apvectors in C++ in school and so far the list type in maki isn't too different, but why doesn't this work?

lunarboy1
9th November 2001, 23:37
By the way. If i wrote:


int i = alist.getNumItems();


i should equal 3 right? but the first items index would be zero right? and the last would be 2?

Just a few quick follow-up questions:).

Naamloos
10th November 2001, 07:36
Yes, first = 0, second = 1 third is 2 :)

I dunno about those others.. :(

lunarboy1
10th November 2001, 20:43
anybody know why

alist.enumItem( 2 );

won't return a string?

lunarboy1
12th November 2001, 23:26
Anybody got any help here?

Naamloos
13th November 2001, 06:26
Maybe PM francis/steve or someone else :)