alice-teacher s Digest, Vol 77, Issue 20

Donald Slater djslater107 at mac.com
Tue Feb 28 14:33:16 EST 2017


If I have been following this thread correctly...

Definitely a problem. Trying to execute something when Alice has quit running the program does not, make sense, on the face of it. Possible options:

	1) Disabling the ability to change the “when the world starts” event to “while the world is running”. The Begin: and During: options have utility while the world is running. But this could be handled (clumsily, perhaps) by creating a method with the "while something is true…” event inside of it. 

	2) Removing the End: option, so that you can execute something when the world Begins: or During: program execution.

	3) Alice could check to see if there is something called in the End: option before completely terminating the thread. I think that this would provide the behavior that Jim was looking for.

Other thoughts / suggestions?

Don Slater

Alice Project
Carnegie Mellon University
Entertainment Technology Center
700 Technology Drive
Pittsburgh, PA 15219

Email: dslater at cmu.edu

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 Feb 28, 2017, at 12:46 PM, robert durtschi <robert.durtschi at gcsu.edu> wrote:
> 
> 
> Primary use I've made in While the World is Running is using during.  
> "while the world is running during: seaplane propeller roll 20 times, style abruptly
> or
> "while the world is running during: CollisionCheck method
> 
> the end option would not necessarily be for the world event. 
> for something like a key pressed event:
>     Begin would be triggered on the leading edge of the key press.
>     During would be detected as the key is held down.
>     End would be triggered on the trailing edge of the key release.
> 
> What I suspect is happening in your case is that the event handler disappears when the program stops. What exactly did you put in the "end" section?
> 
> Bob Durtschi
> 
> 
> 
> In Alice 2, you can right-click on the ?When the world starts? event and change it to ?While the world is running.? I?m not sure why this feature is useful, but it doesn?t seem to work completely. If you put something in the ?End? portion of this event, when you Play the animation and then Stop it (or close the window), you get the Queen reporting a NullPointerException. (See attached screenshot.)
> 
> I?m not sure what the correct behavior should be. I would like it to do the thing I said in the event before the window closes, but then arbitrary user code could generate an infinite loop and make the window impossible to close. Maybe hitting Stop during the End event could stop it for good, so you have to hit Stop at most twice to close the window.
> 
> Or maybe just remove the End option in the event, so we don?t see the error.
> 
> 
> 
> 
> ------------------------------
> 
> End of alice-teachers Digest, Vol 77, Issue 20
> **********************************************
> 
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu <mailto:alice-teachers at lists.andrew.cmu.edu>
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers <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/20170228/e1610a8c/attachment.html>


More information about the alice-teachers mailing list