PDA

View Full Version : How to discover and manipulate parts of an object


target4cactus
06-12-2009, 06:42 PM
In Alice 2, you could manipulate parts of an object. For instance, a penguin had wings, and you could add statements to roll and turn the penguin's right and left wings.

I am not sure how Alice 3 does this -- there is a getPart(???) function in each object. Is that the one? I have tried to use it, but Alice seems to crash when I try. (I am using beta version 55).

I think that the object hierarchy in Alice 2 is straightforward and easy to explain to students, will this be carried forward into Alice 3?

DrJim
06-15-2009, 10:21 AM
-- there is a getPart(???) function in each object. Is that the one?

Yes, but there is a significant difference between Alice 2.x and Alice 3.0. In 3.0, the inheritance/encapsulation principles of OOP are really followed (and will need to be explained to students). Hence, when you are working with an object, only the parts of the object itself are available on the pull down menu. To work with multiple objects, you need to be working on the scene.

So far, the only trouble I've had has been that some of the pull down menus are too small to display all of the body parts. This only affects you if you are using fairly complex objects.

Running on an XP machine with 2G memory, I do get occasional crashes - but none that I've traced specifically to the getPart menus and operation.

target4cactus
06-26-2009, 05:13 PM
Yes, but there is a significant difference between Alice 2.x and Alice 3.0. In 3.0, the inheritance/encapsulation principles of OOP are really followed (and will need to be explained to students).

getPart() will be helpful for introducing the concept of Reflection, which is a more advanced concept. The Alice 2 style object navigation is an excellent way to demonstrate composition. Alice 3 will be less helpful as an introduction to programming if it is dropped.

As of now, the most recent Alice 3 beta release (55) crashes on me every time I try to drag a getPart() call into a statement, so I will wait for the next release and try again.

DrJim
06-27-2009, 10:38 AM
As of now, the most recent Alice 3 beta release (55) crashes on me every time I try to drag a getPart() call into a statement

As I work more with Alice 3, I am noticing that many gallery objects are really difficult to use without taking the system down and that some, like most in the amusement park package, are actually unusuable. I've had the best results with the very simple - and probably oldest - objects such as most in the animals package.

Not very helpful if you want to do a complex project, but enough to keep you up long enough to start to get familiar with the program.