alice-teacher Event Listeners and Handle Active Command in Alice 3.1

Don Slater dslater at andrew.cmu.edu
Thu Oct 2 08:30:21 EDT 2014


Scott,
You did not mention which version of Alice you were interested in exploring…

For Alice 2
 — the software comes with a built in tutorial. Work through the first three to get a sense of how the Alice System works. (The fourth tutorial does not work well on the latest version due to a redesign of the gallery. We hope to have this fixed soon.)

— I think you will want to visit the website maintained by Dr Susan Rodger at Duke University… There are many resources here that I think you will find helpful…

	http://www.cs.duke.edu/csed/alice/aliceInSchools/

— Contact Dr Steve Cooper (coopers at cs.stanford.edu) at Stanford for login and password information to access the instructional materials located at http://www.aliceprogramming.net. These materials include syllabi, presentation slides, sample labs and assignments, solutions and rubrics, and test banks.

For Alice 3
— reviewing the Alice 2 tutorials is not a bad idea, as the basics of the Alice system still apply (at least the first, and perhaps the second)
— There are also tutorial videos for Alice 3 at http://www.alice.org/3.1/materials_videos.php
— Instructional materials for Alice 3 can be found at http://www.alice.org/3.1/index.html. (See the attached screen shot)
— Oracle Academy also has a set of resources you may wish to investigate (links can be found at the above link)

In both cases, the Educator’s mailing list is a great resource. I have found the community to be very generous with a depth and breadth of experience that has proven to be very helpful to instructors starting to teach with Alice.

All the best,

Don Slater
Alice Team
Carnegie Mellon University
5000 Forbes Avenue
Pittsburgh, PA 15213

Email: don at alice.org

I have learned this at least by my experiment: that if one advances confidently in the direction of his dreams, and endeavors to live the life he has imagined, he will meet with a success unexpected in common hours.
--- Henry David Thoreau

The true object of all human life is play. -- G.K. Chesterton








On Oct 1, 2014, at 4:09 PM, Scott Hogben <srhogben at comcast.net> wrote:

> Hi Don,
>  
> There seems to be a lot of info in regards to Alice but it is tough to make heads or tails or to even figure out where things begin.  I would be interested in using Alice in the classroom but I have zero idea where to begin or how to use it.  Is there a curriculum or lessons?  Thank you!
>  
> SCOTT HOGBEN
>  
> From: alice-teachers-bounces+srhogben=comcast.net at lists.andrew.cmu.edu [mailto:alice-teachers-bounces+srhogben=comcast.net at lists.andrew.cmu.edu] On Behalf Of Don Slater
> Sent: Wednesday, October 01, 2014 12:51 PM
> To: Alice Teachers
> Subject: Re: alice-teacher Event Listeners and Handle Active Command in Alice 3.1
>  
> See below...
>  
> On Oct 1, 2014, at 9:39 AM, Emily Higgins <erphiggins at gmail.com> wrote:
> 
> 
> Dear All-
>  I have two questions. 
> 1)  What does the Handle Active command do in Alice 3.1?
>  
> I assume you mean the HandleActiveChanged method of the Scene class. This is a method that will facilitate the creation of multiple scenes in Alice 3 when it is implemented. If you look at what it does right now (see attached screen shot), you will see that it essentially builds the current (and only possible) Scene, readying it for execution. It is not a method you or your students need to use at this time.
>  
> 2) How can you set up a program so that an object is only affected by an event listener for part of the program?  For example, a student wants to have the program user move a box but only at a certain point of the program.  I can't figure out how to limit when an event listener is active.  
>  
> The student should create a boolean variable for the Scene class that is initially set to false as the program runs, and at the time when the student wants the event to become active, he sets the value of the variable to true. He would reset it to false when he no longer wants to listen for the event.
>  
> Then the event would be guarded by an if statement, that performs the event action when the variable is true.
>  
> For example, i have a type of “Whack-A-Mole” game in which the player is supposed to click on the target object when it appears, but you only one to add one point at most for each appearance of the target.
>  
> So my code might look something like
>  
>             Scene variable / property -> boolean isClickedOn = false;
>  
>             Event definition - mouseClickListener
>  
>                         if (mouse clicks on target) and (not isClickedOn)
>                                     add 1 to score
>                                     isClickedOn = true
>  
>             target move method
>                         hide target
>                         if (isClickedOn)
>                                     isClickedOn = false
>                         move target
>                         showTarget
>  
>  
>             myFirstMethod
>                         while (score < targetScore) or (time runs out)
>                                     target move
>                         game over
>  
> Let me know if you have any other questions.
>  
> All the best,
>  
>  
> <image001.png>
>  
> Don Slater
> Alice Team
> Carnegie Mellon University
> 5000 Forbes Avenue
> Pittsburgh, PA 15213
>  
> Email: don at alice.org
>  
> I have learned this at least by my experiment: that if one advances confidently in the direction of his dreams, and endeavors to live the life he has imagined, he will meet with a success unexpected in common hours.
> --- Henry David Thoreau
>  
> The true object of all human life is play. -- G.K. Chesterton
>  
> Thank you,
> Emily Higgins
> Boothbay Region High School
> Boothbay Harbor, Maine
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers
>  
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20141002/fc0ed68e/attachment.html 


More information about the alice-teachers mailing list