[etoys-dev] Connect Etoys and Scratch
Bert Freudenberg
bert at freudenbergs.de
Wed May 25 03:10:12 EDT 2011
Actually I like the prefixing. Maybe the prefix should simply be "scratch"? That would make it obvious where the event comes from.
- Bert -
On 25.05.2011, at 05:13, Koji Yokokawa <ky at yengawa.com> wrote:
> Thank you, Stephen.
>
> I reconsider the naming rule of broadcast events. "broadcast:"+messageName is misleading. I'll remove the "broadcast:". So that the name of custom event name in Etoys is same as the broadcast name in Scratch.
>
> Dispatching event for each change of variable may be overload for values changing continuously. I think that is better to broadcast "variableName" in Scratch as trigger to update the value in Etoys. It's natural for MVC model in Smalltalk too ;)
>
> -- Koji
>
> Steve Thomas wrote 11/05/25 0:57:
>> Totally cool. By setting that preference, the broadcast:* events are
>> auto-magically populated in the "more ..." section of "when scripts
>> should run" (although you need to broadcast at least once to see the
>> event in the list)
>>
>> Also another nice touch is that you also have the Scratch variable names
>> as events, so you can trigger a script on change in "score" or any variable.
>>
>> One possible confusion is that variable "custom events" are not
>> pre-pended with anything, so if you create a variable in Scratch named
>> "normal", you have a custom event called "normal" which could cause
>> confusion.
>>
>> Stephen
>>
>> On Tue, May 24, 2011 at 11:36 AM, Bert Freudenberg <bert at freudenbergs.de
>> <mailto:bert at freudenbergs.de>> wrote:
>>
>> Ah, that preference is more specific. Even better :)
>>
>> - Bert -
>>
>> On 24.05.2011, at 17:22, Koji Yokokawa wrote:
>>
>> > Yes,
>> > a broadcast from Scratch will be converted to a custom event in
>> Etoys.
>> >
>> > I forgot that the custom event is not available in default. Open
>> preferences from menu-halo of the world and search "etoy" to get
>> "allowEtoyUserCustomEvents" in Etoys.
>> >
>> > Koji
>> >
>> > Bert Freudenberg wrote 11/05/24 21:10:
>> >>
>> >> On 24.05.2011, at 13:57, Steve Thomas wrote:
>> >>
>> >>> On Sun, May 22, 2011 at 6:35 AM, Koji Yokokawa<ky at yengawa.com
>> <mailto:ky at yengawa.com>> wrote:
>> >>>> Try to receive messages from Scratch.
>> >>> Couldn't figure out broadcasting from Scratch to Etoys. In
>> Scratch I broadcast "go". In Etoys I tried a script named "go" and
>> one named "broadcastgo" but nothing happened in Etoys. One of your
>> short simple videos would help ;)
>> >>
>> >> I guess Koji-san meant to use a custom event to trigger the
>> script on the ScratchClient. The script name is irrelevant. If you
>> disable "etoys friendly" you find "define a new custom event" in the
>> "more..." submenu for the script trigger. That lets you define other
>> triggers than "mouseDown", "mouseUp" etc. IIUC you need to name it
>> "broadcast:go".
>> >>
>> >> - Bert -
>> >>
>> >
>> > --
>> > Koji Yokokawa <ky at yengawa.com <mailto:ky at yengawa.com>>
>> > http://www.yengawa.com/
>>
>>
>> _______________________________________________
>> etoys-dev mailing list
>> etoys-dev at squeakland.org <mailto:etoys-dev at squeakland.org>
>> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>>
>>
>
> --
> Koji Yokokawa <ky at yengawa.com>
> http://www.yengawa.com/
> _______________________________________________
> etoys-dev mailing list
> etoys-dev at squeakland.org
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
More information about the etoys-dev
mailing list