Quote:
Originally Posted by squirmonkey
If I know that the "who" parameter is always going to be of type kidRobot, is there some way to create it as a parameter of type kidRobot rather than of type Object? Then I wouldn't have to cast it.
|
If there is a way to pass an object to a method as any type other than Object, I don't know what it is. Also, if there is a way in Alice 2.0 to gain access to anything other than the primitive methods and properties of an object passed as a parameter to a method, I haven't figured out what it is either.
However, there is something named "part named" that some people mention as a possible workaround for this issue that you may want to look into. I looked into it when I first became involved with Alice and concluded that it is so foreign to my concept of OOP that I won't even mention it to my students. However, since you are not one of my students I will mention it to you.
I am really anxious for the release of V3.0, which supposedly will be fully object oriented and will eliminate many of the current problems with Alice 2.0.
Quote:
Originally Posted by squirmonkey
What is the point or use of the ____'s variable named ______ of type ______ if you can't use it in a context like this? I couldn't find any place I could drag it except into a print statement.
|
I will pass on this question and let someone else provide a response.
Dick Baldwin
http://www.dickbaldwin.com/tocalice.htm
http://www.dickbaldwin.com/toc.htm