[Newbies] Newbie seeks advice for working with connectors
Edgar J. De Cleene
edgardec2001 at yahoo.com.ar
Tue Sep 9 08:39:29 UTC 2008
El 9/9/08 4:45 AM, "Ian J Cottee" <icottee at bluefountain.com> escribió:
> Hi all
> I've spent the last month or so working through the Squeak By Example
> book and now need to actually try to do something in order to make it
> all gel in my mind. My current requirement seems quite 'simple' to
> describe but I am not quite sure where to go from here.
> For a very simple first step I want to take two text boxes, draw an
> arrow between them and then, when I switch the box 'on' - box1 will
> send an item (represented as a simple shape) along the arrow to box2.
> When it reaches box2, box1 will send the next. As each item reaches
> box2, box2 will be doing 'something'. This is the first stage of
> modelling a production system where items are sent from machine to
> machine down a production line.
> I've found the Connectors framework which solves the problem of
> drawing boxes and linking them together. What I can't work out is that
> if I have a box, how do I know what arrows are connected to it? How do
> I know if the arrow is pointing out of the box or into the box (so
> should I be sending down it or receiving through it) and how do I
> animate that arrow to show an item passing down it?
> I guess the main question is (first of all) just working out what
> arrows are joined to a box. Having browsed through the classes
> NCTextRectangleMorph (my current box class) and NCAAConnectorMorph (my
> current arrow class) I'm none the wiser. Is there any documentation
> for programming the Connectors framework? I've googled but turned
> nothing up so far.
> Any pointers/advice gratefully received.
See my LogicCircus
Click on picture and download the .pr
It's a very bacic Logic Gates simulator, which "wire" components when you
click from first to second.
If you study , could solve some of your needs IMHO.
More information about the Beginners