View Single Post
polymorphism problem
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.

Reply With Quote