<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Terri,<div class="">You are correct that eventListeners and arrays that have their values changed are tricky. In other words, if you create a MouseClickOnObject listener, and in details add the setOfVisuals argument with an array, that listener is “locked into" the array that is created at runtime, and updating the array has no effect on the listener. That is because the listener is in its own thread, and in Alice has no way of tracking changes made to the array in other threads (such as myFirstMethod), as the array will not really know if the event has been triggered before or after the array update in the other thread (a synchronization problem).</div><div class=""><br class=""></div><div class="">However, I found that if instead of using the setOfVisuals argument, I placed a for…each or each in… together control structure in the mouseClickOnObject listener and looped through the array to find the object that had been clicked on, if the array had been updated in any way, that updated version of the array is traversed, and the appropriate objects will respond.</div><div class=""><br class=""></div><div class="">I have attached a world, mouseClickWithArrays.a3p.</div><div class=""><br class=""></div><div class="">I have built an array of Bipeds, two mouseClickOnObjectListeners (one one is enabled at the moment), and code in myFirstMethod which adds and removes Bipeds from the array, after a couple of delay statements.</div><div class=""><br class=""></div><div class="">In the first listener, I am using the setOfVisuals argument, and even though the code in myFirstMethod is rearranging the array, this first listener works only with the original array initialization.</div><div class=""><br class=""></div><div class="">Disable the first listener and enable the second listener. This listener will traverse the current state of the array each time the event is fired, and when the array changes, the objects respond appropriately. (I could still have synchronization problems with this implementation To deal with this, you would have to create a state variable of some sort the listener looks at to determine if the state of the array has changed).</div><div class=""><br class=""></div><div class="">Let me know if you have any other questions.</div><div class=""><br class=""></div><div class="">All the best,</div><div class="">Don Slater</div><div class=""><br class=""></div><div class="">Alice Project</div><div class=""><br class=""></div><div class=""></div></body></html>