<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=""><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 6, 2019, at 10:04 AM, Kelly, Terri <<a href="mailto:kellyt@bishopireton.org" class="">kellyt@bishopireton.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">Awesome.<div class=""><br class=""></div><div class="">I hadn't thought of using the array of whole numbers, and truthfully, my high school students are definitely not ready for that kind of abstraction (well, a few are ... maybe I will show them, because I think that is a neat way to do it).</div><div class=""><br class=""></div><div class="">The unfortunate thing about trying to set it up randomly like this, is that the event listeners do not work ...</div><div class=""><br class=""></div><div class="">If I setup event listeners with the rowA, etc ... then the only type they fire is when the one car that I initialize them to collides with the markers ... </div><div class=""><br class=""></div><div class="">If I run initialize event listeners from myFirstMethod ... they work ... BUT ... that causes all of the event listeners to be created twice ... which means that there are duplicate keyPressed events ... so, every time I press a key, the code is executed twice even if they are set to ignore/fire on keypree ...</div><div class=""><br class=""></div><div class="">Which also affects allowing the user to choose the variable that you want to use the objectMover for ... if you want the user to choose who they are moving around ... you have to write your own arrowkeypress listeners, as the objectMover gets set up before the world starts and even if you put a variable in there ... it only fires for the specific value at the start of the world.</div><div class=""><br class=""></div><div class="">Terri</div><div class=""><div class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class="">Computer Science<div class="">Bishop Ireton</div></div></div></div></div></div><br class=""></div></div><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div class="gmail_quote" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div dir="ltr" class="gmail_attr">On Mon, May 6, 2019 at 8:36 AM Donald Slater <<a href="mailto:djslater107@mac.com" class="">djslater107@mac.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="overflow-wrap: break-word;" class="">Terri,<div class="">It is the craziest thing and I believe that you have found a bug.</div><div class=""><br class=""></div><div class="">It turns out that if I use the array “allCars”, the program will recognize and execute the<span class="Apple-converted-space"> </span><b class="">drive</b><span class="Apple-converted-space"> </span>procedure.</div><div class=""><br class=""></div><div class="">You have set up these supplemental arrays of Automobiles to keep track of the different rows of cars. You initialize these arrays with the black car, and then in setup successfully populate these arrays with random sets of cars, replacing the black car with different automobiles from the scene.</div><div class=""><br class=""></div><div class="">The setup works as you would expect If you print these row arrays, you see the different cars.</div><div class=""><br class=""></div><div class="">The bug seems to occur in that for some reason, even though these are arrays of automobiles, in the linking of the random car to the array, Alice loses track of the fact that there are methods associated with that object (in this case, drive), and simply ignores the call to that method. There may be a type problem here in that Alice uses SThing somehow in the reassignment of an object to an array of objects, but that is only speculation on my part, and the dev team may have more to say about this.</div><div class=""><br class=""></div><div class="">Another workaround, you have already found one, would be that your row arrays could be arrays of WholeNumbers, storing random indices from allCars rather than the car object. Then you could use the allCars array with the index values from these row arrays to call<span class="Apple-converted-space"> </span><b class="">drive</b>.</div><div class=""><br class=""></div><div class="">I have attached your original world (I have added a couple of statements to help me with debugging), plus a test world I built to help me check my hypothesis, for the dev team to look at. I will be interested to see if they have any other thoughts.</div><div class=""><br class=""></div><div class="">Thank you, and 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></div><div style="overflow-wrap: break-word;" class=""><div class=""></div></div><div style="overflow-wrap: break-word;" class=""><div class=""></div><div class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On May 5, 2019, at 10:21 PM, Kelly, Terri <<a href="mailto:kellyt@bishopireton.org" target="_blank" class="">kellyt@bishopireton.org</a>> wrote:</div><br class="gmail-m_8097585553557721314Apple-interchange-newline"><div class=""><div dir="ltr" class="">Don,<div class=""><br class=""></div><div class="">I tried to recreate it in a simple world and ... it worked.  So... there must be something in this crazy world.</div><div class=""><br class=""></div><div class="">There is a second problem that I would appreciate you taking a minute to look at.</div><div class=""><br class=""></div><div class="">So - the first problem is the calling of a class method from an item in an array ... the method I am trying to call is an automobile method named drive.  I am calling it from the scene level method moveRow, which is called from myFirstMethod after setup is done. Setup appears to work properly and I have put in several say statements to narrow down the problem.</div><div class=""><br class=""></div><div class="">The second issue is the event listener, collision... when I run this world, it takes FOREVER to return from running, unless I comment out the event listener.  The event listener worked great when there was just a small array of automobiles (5 in number), but when I added the other 15 ... it just almost seems to hang when returning from running...  It doesn't actually hang - it just takes forever to come back.</div><div class=""><br class=""></div><div class="">I recreated the entire world (everything) in a new Alice world and ... created 4 collision event listeners each with an array of just 4 items and ... the delay in ending execution occurred again.  </div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class="">Terri KElly</div><div class=""><div class=""><div dir="ltr" class="gmail-m_8097585553557721314gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class="">Computer Science<div class="">Bishop Ireton</div></div></div></div></div></div><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 5, 2019 at 6:00 PM Donald Slater <<a href="mailto:dslater@andrew.cmu.edu" target="_blank" class="">dslater@andrew.cmu.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div class="">Terri,<div class="">Would you mind sending a copy of your program? I am trying to recreate the problem based on your description, but I do not think I am getting it right, as everything seems to be working for me… I must be missing something…</div><div class=""><br class=""></div><div class="">Also, I am using the latest download of Alice available on<span class="Apple-converted-space"> </span><a href="http://alice.org/" target="_blank" class="">alice.org</a> (3.5). We added set and get indexed value into procedure and function list for all array properties, but I do not think that is related to your issue. But if you are using an older version of Alice you might try it.</div><div class=""><br class=""></div><div class="">Looking forward to hearing from you.</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<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On May 4, 2019, at 4:27 PM, Kelly, Terri <<a href="mailto:kellyt@bishopireton.org" target="_blank" class="">kellyt@bishopireton.org</a>> wrote:</div><br class="gmail-m_8097585553557721314gmail-m_7647762616223646831Apple-interchange-newline"><div class=""><div dir="ltr" class="">I have a world which is not behaving like I am expecting it to.<div class=""><br class=""></div><div class="">I have an array of automobiles called rowA[]</div><div class="">I have a method created for automobiles called go</div><div class="">In go, the first thing I have this do is say it's Sthing (this say "" + SThing this)</div><div class=""><br class=""></div><div class="">If I call go with blueTruck, it works fine, the truck says blueTruck and then moves forward</div><div class=""><br class=""></div><div class="">blueTruck.go()</div><div class=""><br class=""></div><div class="">If I call go with rowA[0].go ... Alice hangs, </div><div class=""><br class=""></div><div class="">So, from the test method I have</div><div class=""><br class=""></div><div class="">blueTruck.go()</div><div class="">rowA[0] = blueTruck</div><div class="">rowA[0].say "" + Sthing rowA[0]</div><div class="">rowA[0].go</div><div class=""><br class=""></div><div class="">Is there any reason why I should not be able to call a class level method from an array that is of that type class?  </div><div class=""><br class=""></div><div class="">Terri Kelly</div><div class="">Computer Science</div><div class="">Bishop Ireton High School</div><div class="">Alexandria, VA</div></div><br class=""><i style="color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);" class=""><font size="2" class="">The information contained in this communication may be subject to legal confidentiality protection or privilege. It is intended solely for use by the intended recipient and others authorized to receive it. If you have received this communication in error, please notify the sender and delete it immediately. You are hereby notified that any disclosure, copying, distribution or taking action in reliance of the contents of this information is strictly prohibited and may be unlawful.  The school accepts no liability whatsoever for any damage, loss, or expense arising from any misuse of this e-mail and/or from the accessing of any files attached to this e-mail.</font></i>_______________________________________________<br class="">alice-teachers mailing list<br class=""><a href="mailto:alice-teachers@lists.andrew.cmu.edu" target="_blank" class="">alice-teachers@lists.andrew.cmu.edu</a><br class="">To change settings or unsubscribe visit:<br class=""><a href="https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers" target="_blank" class="">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</a></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">alice-teachers mailing list<br class=""><a href="mailto:alice-teachers@lists.andrew.cmu.edu" target="_blank" class="">alice-teachers@lists.andrew.cmu.edu</a><br class="">To change settings or unsubscribe visit:<br class=""><a href="https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers" rel="noreferrer" target="_blank" class="">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</a></blockquote></div><br class=""><i style="color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);" class=""><font size="2" class="">The information contained in this communication may be subject to legal confidentiality protection or privilege. It is intended solely for use by the intended recipient and others authorized to receive it. If you have received this communication in error, please notify the sender and delete it immediately. You are hereby notified that any disclosure, copying, distribution or taking action in reliance of the contents of this information is strictly prohibited and may be unlawful.  The school accepts no liability whatsoever for any damage, loss, or expense arising from any misuse of this e-mail and/or from the accessing of any files attached to this e-mail.</font></i><span id="gmail-m_8097585553557721314cid:f_jvbqnp2s0" class=""><Frogger.a3p></span></div></blockquote></div><br class=""></div></div></blockquote></div><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><i style="font-family: Helvetica; font-size: 12px; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);" class=""><font size="2" class="">The information contained in this communication may be subject to legal confidentiality protection or privilege. It is intended solely for use by the intended recipient and others authorized to receive it. If you have received this communication in error, please notify the sender and delete it immediately. You are hereby notified that any disclosure, copying, distribution or taking action in reliance of the contents of this information is strictly prohibited and may be unlawful.  The school accepts no liability whatsoever for any damage, loss, or expense arising from any misuse of this e-mail and/or from the accessing of any files attached to this e-mail.</font></i></div></blockquote></div><br class=""></div></body></html>