Re: how to hide ALL connectors to/from a specific node in the Connectors package?
karl ramberg <[email protected]> Tue, 17 Sep 2013 20:36:10 +0200
| Newsgroups | gmane.comp.lang.smalltalk.squeak.squeakland |
|---|---|
| Message-ID | <CAGzzWLhfesCvuHcrfP0kEvy1w_i6OGoP4U_ErC+uQdzWPgoQBw@mail.gmail.com> |
First #tellAllIncomingConnections: aMessageSelector and #tellAllOutgoingConnections: aMessageSelector 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: to 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: Karl On Sat, Sep 14, 2013 at 10:45 PM, Lawson English <[email protected]> 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 > [email protected] > http://lists.squeakland.org/**mailman/listinfo/squeakland<http://lists.squeakland.org/mailman/listinfo/squeakland> > _______________________________________________ squeakland mailing list [email protected] http://lists.squeakland.org/mailman/listinfo/squeakland