Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
polymorphism problem
Old
margush
Guest
 
Status:
Posts: n/a
Default polymorphism problem - 10-21-2005, 07:17 PM

I have created a custom version of a robot (adding methods to walk and so on). There is a boolean property named moving. I have methods to set it true or false (startMoving, stopMoving).

I have imported three of these robots and all move randomly.

I would like to be able to start/stop a robot by clicking on it and using the object under the cursor to call the appropriate method or set the moving variable directly... of course this is impossible since these are my own custom property/methods. Can you suggest a workaround short of an object by object comparison?

There is a reference to this in the FAQ, but it is vague. Are the functions named robot's part named key and robot's variable named variableName of type valueClass of any use here? And how are these functions used? I cannot find any destination for the last one.

Thanks.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.