From Etoys is there a way to check when a Morph is dropped in another
Morph to later take appropriate action? Moreover when doing the check I would want to decide to accept or not the drop. Is it doable with Etoys tiles? After a 30 mins research, I have failed to see how it can be done.
Hilaire
On 25.03.2009, at 09:45, Hilaire Fernandes wrote:
From Etoys is there a way to check when a Morph is dropped in another Morph to later take appropriate action? Moreover when doing the check I would want to decide to accept or not the drop. Is it doable with Etoys tiles? After a 30 mins research, I have failed to see how it can be done.
I don't think that's possible in the Morphic sense. However, maybe you can design your interface around the given constraints:
When you drop something into a holder, its "count" property changes. Watching for that change lets you react to the drop.
You can also move an object from one holder to another, using the "include" tile.
- Bert -
On Wednesday 25 Mar 2009 2:15:10 pm Hilaire Fernandes wrote:
From Etoys is there a way to check when a Morph is dropped in another Morph to later take appropriate action? Moreover when doing the check I would want to decide to accept or not the drop. Is it doable with Etoys tiles?
I didn't see any direct way either. When stuck with problems like these, I imagine how I would tackle such situations with real toys and sensors.
What do those morphs represent? Have you tried using a script to monitor the geometry of the two morphs to check for overlaps?
Subbu
Here a small explanation about what the result should be in the term of functionnality (it is a teacher request, so I really want to try it).
For a simulation about the atmosperic CO2 gaz effect, teacher wants the kid to compose an earth situation. A situation is composed of two overlays: a kind of landscape (icy, sandy, vegetation) and a kind of human activity (low, medium, high with a lot of car and factory). I already build a project like that (it is attached so you get a chance to understand what I am trying to explain), but to change the overlay, the kids use two sliders, and the teacher prefers a direct drag and drop of the overlay in a target. So the kids should be able to pick up from the containers an overlay and drop it in a target. Depending on the overlay composition a CO2 gaz effect value is calculated and used to design a visual user feedback for the kid (flooding..)
Not sure it is clear, but looking at the .pr file it may help to understand what is needed
Hilaire
2009/3/25 K. K. Subramaniam subbukk@gmail.com:
On Wednesday 25 Mar 2009 2:15:10 pm Hilaire Fernandes wrote:
From Etoys is there a way to check when a Morph is dropped in another Morph to later take appropriate action? Moreover when doing the check I would want to decide to accept or not the drop. Is it doable with Etoys tiles?
I didn't see any direct way either. When stuck with problems like these, I imagine how I would tackle such situations with real toys and sensors.
What do those morphs represent? Have you tried using a script to monitor the geometry of the two morphs to check for overlaps?
Subbu _______________________________________________ Etoys mailing list Etoys@lists.laptop.org http://lists.laptop.org/listinfo/etoys
On Wednesday 25 Mar 2009 6:24:15 pm you wrote:
So the kids should be able to pick up from the containers an overlay and drop it in a target. Depending on the overlay composition a CO2 gaz effect value is calculated and used to design a visual user feedback for the kid (flooding..)
You could allot the activity (holder) a given amount of CO2 (say 1 million). For each vehicle, factory, tree etc. allot a CO2 generation rate (+10 for cars, -2 for a tree etc). Have a script in the activity iterate over all its contents and add its CO2 generation rate to its current count. Compute temperature rise from CO2 levels and set the flooding level to increase in temperature.
Have the students program the CO2 rate for different objects and try them out in the activity. A big tree consume more CO2 than a small tree. This can be done by tying generation rate to the size (length*width).
Objects like trees could be made to shrink if the CO2 levels are insufficient to meet their needs and that would affect sustainability of life (after all, plants make food for us). You could compute an indicator for the ability of activity to sustain life. If levels are high, then objects which increase CO2 could be flashed to indicate danger to the ecosystem.
A wonderful project to stimulate thinking about our environment.
HTH .. Subbu
Thanks for sharing your idea, it brings a fresh view on the activity I can prepare for the teacher.
Hilaire
2009/3/25 K. K. Subramaniam subbukk@gmail.com:
On Wednesday 25 Mar 2009 6:24:15 pm you wrote:
So the kids should be able to pick up from the containers an overlay and drop it in a target. Depending on the overlay composition a CO2 gaz effect value is calculated and used to design a visual user feedback for the kid (flooding..)
You could allot the activity (holder) a given amount of CO2 (say 1 million). For each vehicle, factory, tree etc. allot a CO2 generation rate (+10 for cars, -2 for a tree etc). Have a script in the activity iterate over all its contents and add its CO2 generation rate to its current count. Compute temperature rise from CO2 levels and set the flooding level to increase in temperature.
Have the students program the CO2 rate for different objects and try them out in the activity. A big tree consume more CO2 than a small tree. This can be done by tying generation rate to the size (length*width).
Objects like trees could be made to shrink if the CO2 levels are insufficient to meet their needs and that would affect sustainability of life (after all, plants make food for us). You could compute an indicator for the ability of activity to sustain life. If levels are high, then objects which increase CO2 could be flashed to indicate danger to the ecosystem.
A wonderful project to stimulate thinking about our environment.
HTH .. Subbu
etoys-dev@lists.squeakfoundation.org