Hi,
I created a simple sorting demo in EToys for a presentation. After building and implementing the first demo I created a copy of the Holder. This is a deep copy, not a sibling- the idea is to implement another sorting algorithm in the copy by changing its existing scripts, and then run it side by side with the original version.
The bug I'm running into involves adding a new script to the new copy of the Holder. The "Holder1 startScript emptyScript" tile will not list my new script, until I go back and add a new script with the same name to the original Holder. I'm pretty sure that is not the desired behavior but I haven't been able to dig deep enough into the underlying code to find the problem. It appears to be looking back to the original copy to find the list of scripts which are available, when it should be looking at the scripts in the copy.
The work-around is easy enough- add an empty script to the original Holder named the same as my new script- but if anyone has a fix, or can point me towards the general code I should be looking at, I would appreciate it.
Thanks!
Jerry Bell
Hi, Jerry,
Yes, this is a bit of a subtle bug, which I'll fix :-)
Meantime, there's an easier workaround that doesn't involve having to add a dummy script to your original object. Instead, after you've made the duplicate object, just hit the red "stop" button of any stop-step-go "all-scripts tool."
Once you've done that, you'll find that your added script appears in the list of script-name choices offered in the popup.
(This workaround may sound bafflingly unrelated to the issue you describe, but it really does address the core problem, and *will* correct the situation :-) ).
Cheers,
-- Scott
At 8:41 AM -0600 3/31/05, Jerry Bell wrote:
Hi,
I created a simple sorting demo in EToys for a presentation. After building and implementing the first demo I created a copy of the Holder. This is a deep copy, not a sibling- the idea is to implement another sorting algorithm in the copy by changing its existing scripts, and then run it side by side with the original version.
The bug I'm running into involves adding a new script to the new copy of the Holder. The "Holder1 startScript emptyScript" tile will not list my new script, until I go back and add a new script with the same name to the original Holder. I'm pretty sure that is not the desired behavior but I haven't been able to dig deep enough into the underlying code to find the problem. It appears to be looking back to the original copy to find the list of scripts which are available, when it should be looking at the scripts in the copy.
The work-around is easy enough- add an empty script to the original Holder named the same as my new script- but if anyone has a fix, or can point me towards the general code I should be looking at, I would appreciate it.
Thanks!
Jerry Bell
squeakland@lists.squeakfoundation.org