Click to Stop a Process (a spinning morph)

Post your nifty GP projects here!

Moderator: MSandro

Post Reply
mguzdial
Posts: 70
Joined: Sep 15th, '15, 11:21

Click to Stop a Process (a spinning morph)

Post by mguzdial » Jul 2nd, '16, 20:55

I was trying to figure out how to get a "Stop" button to work, and I kept getting it wrong. So I built this small example as a way to test out the ideas. It works, and I realized that it might be a useful example for someone else trying to understand how to make this work. Click "Go" to start it.
stopMe.gpp
(9.04 KiB) Downloaded 30 times

MrSteve
Posts: 61
Joined: Jun 16th, '16, 01:22

Re: Click to Stop a Process (a spinning morph)

Post by MrSteve » Jul 3rd, '16, 03:58

Thanks, curious as to why you didn't try "stop" or "stop all" tiles in Control?
Although i found that stop tile doesn't seem to work, so perhaps that is the reason :)

It seems "stop all" tile is equivalent of clicking the stop button next to the go button. Actually tried to find out how the stop button was implemented and it calls 'stopAll'.

Now the next questions I have is how many kinds of "stop" are there or should there be?

Here are my thoughts:
1) Stop all scripts in the world, ie: "stopAll"
2) Stop all scripts for myself and all my siblings (ie: other instances of my class)
3) Stop all scripts for myself only
4) Stop a particular script

For the #4 (and perhaps #3) I could see using variables as you did in your example, for the others I would prefer a scripting tile.

mguzdial
Posts: 70
Joined: Sep 15th, '15, 11:21

Re: Click to Stop a Process (a spinning morph)

Post by mguzdial » Jul 3rd, '16, 15:56

I'm working on a sound recorder, where there is a Record button and a Play button, and a Stop button that stops either. Both of them have some cleaning up to do after the playing or recording is finished, so I want to send a signal to stop instead.

Post Reply