When I create a script with a variable assignment I can't replace the variable tile with another.
To reproduce make two variables for a morph. Make a assignment script for one of them. Pull out the name part of the second variable and try to drop it on the name part of the one in the script.
This bug makes it hard to refactor scripts and experiment, because you have to recreate the whole tile row to change just the assignment.
Karl
On Saturday 14 Jun 2008 3:37:26 pm Karl Ramberg wrote:
To reproduce make two variables for a morph. Make a assignment script for one of them. Pull out the name part of the second variable and try to drop it on the name part of the one in the script.
I have never been able to do that even with Squeakland image. I thought this was because the variable tile is a getter, not a setter. It can only be dropped on the right hand side of an assignment. Why would this be a bug?
I suppose it should be possible to pick up the setter from the slot definition and create a setter tile on the fly.
Yes, it would be useful, Subbu
K. K. Subramaniam wrote:
On Saturday 14 Jun 2008 3:37:26 pm Karl Ramberg wrote:
To reproduce make two variables for a morph. Make a assignment script for one of them. Pull out the name part of the second variable and try to drop it on the name part of the one in the script.
I have never been able to do that even with Squeakland image. I thought this was because the variable tile is a getter, not a setter. It can only be dropped on the right hand side of an assignment. Why would this be a bug?
It's a problem that is so easy to do when you type in the commands but so hard when moving tiles. It's a hassle to reproduce long long expressions to just change the receiver. I found a kind of workaround though, if the variable name is the same for two players you can drop just the name tile to change the receiver.
I suppose it should be possible to pick up the setter from the slot definition and create a setter tile on the fly.
Yup
Karl
etoys-dev@lists.squeakfoundation.org