Posted by
LawsonEnglish on
Sep 14, 2013; 8:45pm
URL: https://forum.world.st/how-to-hide-ALL-connectors-to-from-a-specific-node-in-the-Connectors-package-tp4708336.html
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"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
_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev