[etoys-dev] FW: [squeakland] how to hide ALL connectors to/from a specific node in the Connectors package?
kharness at illinois.edu
Sat Sep 14 19:55:59 EDT 2013
This solution is from Lenny Pitt who has helped Etoyillinois a lot!
From: Pitt, Leonard B
Sent: Saturday, September 14, 2013 4:58 PM
To: Harness, Kathleen
Subject: Re: [squeakland] how to hide ALL connectors to/from a specific node in the Connectors package?
I'm not on squeakland / Etoys mailing list, but perhaps you can pass along
All pins should be siblings of each other.
All connectors should be siblings of each other.
Now, create a script called "hideme" for a connector, which has only the
So, if a pin tells all incoming connectors to execute the script "hideme",
they will hide, and similarly, if a pin tells all outgoing connectors to
execute the script "hideme", they all will hide.
Now, to make ALL the connectors hide at once, we need to tell all pins to
tell all incoming and outgoing connectors to execute the script hideme.
To do this, create the following script:
A script for a pin called "hideeveryone" which has in it only the two
tell all incoming connectors execute script hideme.
tell all outgoing connectors execute script hideme
Now, just have any pin send to all siblings "hideeveryone".
As a result, all pins will execute the script "hideeveryone".
Which means all will send to all their incoming and outgoing connectors
the command to execute the hideme script.
Note that this is overkill - we don't need to tell both incoming and
outgoing connectors to execute the hideme script, since every connector is
an incoming and outgoing from someone. So the script "hideeveryone" needs
to only have one of the two lines in it.
On Sat9/14/13 Sep 14,4:04 PM, "Harness, Kathleen" <kharness at illinois.edu>
>I thought you might find this note interesting:
>a fully connected graph using Etoys and the problems Lawson English is
>He also has a link to an Introduction to Squeak in 68 videos that he
>posted on You Tube.
>Beyond me but I always like knowing there is more.
>From: squeakland-bounces at squeakland.org
>[squeakland-bounces at squeakland.org] on behalf of Lawson English
>[lenglish5 at cox.net]
>Sent: Saturday, September 14, 2013 3:45 PM
>To: etoys dev; Squeakland List
>Subject: [squeakland] how to hide ALL connectors to/from a specific node
>in the Connectors package?
>I'll try again:
>I have 19 Connectors nodes showing in my project.
>There are 19 x 18 connectors -a fully connected graph.
>I want to be able to easily tell all connectors to hide using Etoys
>scripting. I already know how to do this with Squeak, but it isn't
>obvious at all how to make it work with etoys, despite the existence of
>a scripting option "tellAllIncomingConnections" and
>I can't figure it out.
>I've dropped down into the System browser and looked at the Smalltalk
> "Send the given message selector to all the players of the
>receiver's costume's outgoing connections"
> self costume outgoingConnections do:
> [:m |
> m playerRepresented ifNotNilDo:
> [:p | p performScriptIfCan: aMessageSelector]]
>I've even tried putting ^#hide into the script.
>Is this aspect of Connectors + Etoys broken or am I missing something?
>I can specify a SPECIFIC Connector to hide, but I have potentially 19 x
>18 or even 256 x 255 of them to work with, so obviously this isn't an
>Do I have to go with my incredibly cumbersome code I worked out in my
>Squeak youtube tutorials and stick that into a script, instead?
>Squeak from the very start (introduction to Squeak and Pharo Smalltalk
>for the (almost) complete and compleate beginner).
>"Debugging is twice as hard as writing the code in the first place.
>Therefore, if you write the code as cleverly as possible, you are, by
>definition, not smart enough to debug it." - Brian Kernighan
>squeakland mailing list
>squeakland at squeakland.org
More information about the etoys-dev