View Full Version : Array not working

12-27-2009, 11:25 AM
I can't get the array function to work. I have been following Chapter 10 of my textbook, but when I copy the elements over to the array function, it doesn't copy like it should. What am I doing wrong? I need to get this done for an assignment. I have included what I have done so far. Thanks in advance for any help you can give me.

12-28-2009, 10:15 AM
It might be easier to create the array as a variable inside of your method.

Also, the purpose of using the array is minimize the coding, so the events area should have only one entry which passes whatWasPicked() to your routine when <anything> is clicked. Your routine then decides whether the clicked object is an element in the local array variable, and takes the appropriate action.

Think "if" inside of a "for";)

02-14-2010, 07:41 AM
Note that arrays have some serious bugs in Alice - non-object arrays (of numbers, strings, booleans) do not work properly (if you're using Alice2.0 then you should know that some of these bugs were fixed in Alice 2.2, although that's not being specified in the Alice 2.2 changes notes http://alice.org/index.php?page=downloads/download_alice2.2).

02-17-2010, 05:22 PM
Oooh! Sneaky, MrMoke!

I like the wink afterwards.