alice-teacher array element removal/deletion in Alice 3.1.58

Don Slater dslater at andrew.cmu.edu
Thu Jan 31 13:54:56 EST 2013


The short answer is, at this time there are no tricks… You will have to rebuild the array. I am sorry…

The longer answer:
There are three scenario's that you may be asking about.

If while building an array, and before clicking on "Ok" to finalize the initialization you wish to remove an element, there should be some way to remove an element that you added and realized that you did not want (Alice 2 has a "remove element" button for example). This feature is coming and should be available relatively soon. 

Clicking on "Ok" leads to the second scenario.

In this case you have initialized the array with some set of elements, and you realize that you want to remove one of those elements. It would be great if the original initialization list would appear when you select "Custom Array", giving you access to the feature described above. Unfortunately that feature has not been implemented, but probably will be soon.

The third scenario would be removing an element from a list at run-time (while your animation is actually running). This is actually not easily done in Java arrays. The Java Collection classes, including lists, allow you to remove an element from the Collection. In Alice 2, there were both lists and arrays, and elements could be removed from the lists, but not easily from the arrays.

Alice 3 at this time only implements arrays, and so the only way to "remove" an element from an array at runtime is, again, to rebuild it.

A long answer to a short question, I am afraid.

Let me know if you have any other questions.


On Jan 31, 2013, at 10:38 AM, Steven Pleau <spleau at assabet.org> wrote:

> Good morning,
>  
> I am trying to remove elements from an array in version 3.1.58 without much success??  Is it even possible?  If so, what is the trick!??
>  
> Thanks
>  
> Steve
> Steven Pleau
> Programming & Web Development Teacher
> Assabet Valley Regional Technical High School
> 215 Fitchburg Street
> Marlborough, MA 01752-1288
> 508-485-9430 x2840
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20130131/2aef3caa/attachment.html 


More information about the alice-teachers mailing list