<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
One of my students found an unexpected problem with Object Tree groups in Alice 2 today.
<div class=""><br class="">
</div>
<div class="">1. If you put an object under a group in the object tree, the object’s variables are not available for use in other objects’ methods. You can't drop the variable into a target parameter, and you can’t find the variable under “expressions” in the
 parameter, either. Maybe this is intended behavior; it enforces encapsulation. However, you can still drag the variable itself and turn it into an increment instruction, for example. So that is inconsistent.</div>
<div class=""><br class="">
</div>
<div class="">2. If you put an object under a group in the object tree, and the object has object-level events, those events don’t work. This really seems like it must be a bug. To reproduce this, add a fire object (Special Effects) to the world. Note the object-level
 “When the world starts" event. The fire spins when you run the program. Now create a group in the object tree and put the fire in the group. Run the program and the fire will not spin. (We found the problem with a key event on something else; it is not just
 a problem with the fire.) This problem goes deeper: If you save the project, the next time you open it, the object-level events are missing. If you move the object out of the group to the top level, the events appear. So putting an object into an object tree
 group disables the object’s events.</div>
<div class=""><br class="">
</div>
<div class="">My student was trying to organize his project (which he anticipates will have many objects) by putting the objects in groups in the object tree. He ran into the problem with the variables first. Today he asked me how to keep the Events organized,
 and I showed him how to use object-level events. Then he discovered the second problem.</div>
<div class=""><br class="">
</div>
<div class="">James<br class="">
<div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
—<br class="">
James Vanderhyde<br class="">
Assistant Professor, Computer Science<br class="">
Program Director, Master of Applied Computer Science<br class="">
Saint Xavier University<br class="">
3700 W. 103rd St.<br class="">
Chicago, IL 60655<br class="">
773-298-3454</div>
</div>
<br class="">
</div>
</body>
</html>