Alice Community  

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

Reply
 
Thread Tools Display Modes
Using object Param w/ method for > 1 object
Old
itrickski
Guest
 
Status:
Posts: n/a
Default Using object Param w/ method for > 1 object - 11-03-2006, 08:28 PM

i have written a world-level method called "hokey-pokey" in which a student object does this timeless dance. <grin> i wanted to modify this to accept an object parameter, so that i could make different objects do the "hokey pokey". i realize that this method should only be called for objects that have "left legs" and "right legs".

if i create an object param for the method, then the only option i can see is to replace

student1.leftleg turn backwards with
myobjectparam turnl backwards

in other words, i can't get to the "left leg" of the object being passed in as a parameter. Is there a way to accomplish this?

I have the same problem with snowpeople flipping hats in 4.1.1 of "Learning to program with Alice". I thought the idea was to create a method called "fliphat", which could be called for the snowman, or snowwoman. however, i don't know how to make this work.

i hope this question makes sense.
   
Reply With Quote
Same question as roofy asked?
Old
DrJim
Guest
 
Status:
Posts: n/a
Default Same question as roofy asked? - 11-04-2006, 07:49 PM

I think this is the same question roofy also asked earlier - you might check what I posted there (and maybe someone has come up with a better answer).
   
Reply With Quote
Reply


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.