PDA

View Full Version : User-defined methods do not show in pop-up menu?


Sophie
06-11-2009, 09:53 AM
Outside "Play" mode, when I right click on an object I get a pop-up menu so I can invoke methods on an object. However, the new methods I have added do not show up on this menu.

Am I doing something wrong?

Thanks

lanceA
06-11-2009, 11:24 AM
Outside "Play" mode, when I right click on an object I get a pop-up menu so I can invoke methods on an object. However, the new methods I have added do not show up on this menu.

Am I doing something wrong?

Thanks

Sophie what you see when you right-click and object are the "default" methods. Any user defined/created methods will not appear when you right-click an object, you must access the Details pane to view user defined methods and functions.

Sophie
06-11-2009, 12:07 PM
Thanks, lanceA. Any idea why this distinction?

My main goal is to be able to manually invoke a method to test it. Can I do this from the details pane?

Thanks

lanceA
06-11-2009, 01:12 PM
Thanks, lanceA. Any idea why this distinction?

My main goal is to be able to manually invoke a method to test it. Can I do this from the details pane?

Thanks

Sophie,
The simplest way to test the new methods/functions that you create is to use the Events Pane, in the upper right-hand corner of the Alice screen.

Currently it probably says something like: "When the world starts, do: world.myfirst method". Simply click on the down-arrow at the end of that statement and select the method/function that you wrote. If parameters are required, Alice will ask you for values to use for the paramaters when you play the animation.

Just remember to reset the events pane back to myfirst method, or whatever method you wish to run when the world starts.

Good luck, :)