Re: FW: how to hide ALL connectors to/from a specific node in the Connectors package?
Thanks for the response.
However, I assume that "tile hide" really means a tile for
also, it doens't work. I only manage to hide the specific connector. Yes
they are all siblings.
I can't find an AllPlayers tool mentioned in the online manual. Perhaps
this is the holdup? I'm using the Mac version.
On 9/14/13 4:55 PM, Harness, Kathleen wrote:
> Hi Lawson,
> 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
> the solution:
> 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
> tile "hide".
> 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@...>
>> Hi Lenny,
>> 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@...
>> [squeakland-bounces@...] on behalf of Lawson English
>> 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
>> code for
>> #tellAllIncomingConnections: aMessageSelector
>> #tellAllOutgoingConnections: aMessageSelector
>> "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
Squeak from the very start (introduction to Squeak and Pharo Smalltalk for the (almost) complete and
"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