[etoys-dev] [squeakland] how to hide ALL connectors to/from a specific node in the Connectors package?

karl ramberg karlramberg at gmail.com
Tue Sep 17 14:36:10 EDT 2013


#tellAllIncomingConnections: aMessageSelector and #tellAllOutgoingConnections:

are just the first level connectors directly connected to the morph in
question. Its one level deep.

You can look at
Player>>tellAllSuccessors: aMessageSelector

If you change

self costume successors do:


self costume allSuccessors do:

you get a graph of all the morphs successors to the morph

This is IMO a bug. It says tellAllSuccessors but tells only the first node
in the successor graph.

Same goes for tellAllPredecessors:


On Sat, Sep 14, 2013 at 10:45 PM, Lawson English <lenglish5 at cox.net> wrote:

> 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 "tellAllOutgoingConnections"
> I can't figure it out.
> I've dropped down into the System browser and looked at the Smalltalk code
> for
> #tellAllIncomingConnections: aMessageSelector
> and
> #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 option.
> 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?
> Thanks.
> L
> --
> Squeak from the very start (introduction to Squeak and Pharo Smalltalk for
> the (almost) complete and compleate beginner).
> https://www.youtube.com/**playlist?list=**PL6601A198DF14788D&feature=**
> view_all<https://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=view_all>
> "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
> http://lists.squeakland.org/**mailman/listinfo/squeakland<http://lists.squeakland.org/mailman/listinfo/squeakland>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20130917/8c316813/attachment.html>

More information about the etoys-dev mailing list