nirmalmakadia
02-20-2007, 03:45 PM
Hi...
I have a class level method for an object. Is there anyway I can use that method for another object without re-writing the code?
Thanks / Regards
DrJim
02-20-2007, 11:34 PM
See the recently posted thread: http://www.alice.org/community/showthread.php?p=2260&posted=1#post2260
If you don't want to import the full object - or aren't working with multiple worlds - you can just create a method with the name you want and use the clipboard to copy code from one method to the other. However you do have to be careful that everything referenced in the copied code exists - either as part of the new object or elsewhere in the world - or the drop will fail (ususally not a problem if you're copying code only within one world).
Also, when you modify the code for the new object, you have to make sure that the full names of everything are correct - sometimes the differences between the names for the various parts of Alice objects are not obvious.