Alice Community

Alice Community (
-   How do I...? (
-   -   List/Array question (

Choad 03-09-2007 09:53 AM

List/Array question
I have created a new class 'marchingSoldier' which contains a method 'march'.
I have a list of four marchingSoldier instances called 'soldierList'. I want to iterate through the list using 'For all together' such that each element in the list has its 'march' element called.

E. g.,
For all world.soldierList, every obj item from_soldierList together
obj item_from_soldierList.march

I cannot find a way to accomplish this where the method to be called is local to an object in the List - a new method in the object.



All times are GMT -5. The time now is 01:40 PM.

Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.