Re: Question about handles



On Tue, Jul 29, 2008 at 4:21 AM, Don Blaheta <blahedo blahedo org> wrote:

There are two specialized objects involved in building a connection. One is
a Handle, the other one is a ConnectionPoint. In an existing connection
between two DiaObject the Handle belongs to the first ("connected to") and
the ConnectionPoint belongs to second ("connected by").

Note: the word "connected" is passive in both "connected to" and
"connected by".  Part of what I found confusing about the exchange was
that Hans seems to find the to/by distinction obvious, whereas to me it
seems rather arbitrary and *quite* at odds with the natural English
interpretations of those phrases.

Actually, from what I can remember about grammar back from school
days, it's not the voice that is needed here, but the case. A line
connects two objects. So the line is the connector (nominative case)
while the objects are the connectees (objective case).

an _English_ description would say that the line is "connected to" both
boxes, each box is "connected to" the line, and box 1 and box 2 are
"connected by" the line that runs between them (but only as a pair;
"box 1 is connected by the line" is nonsensical as English).  In fact,
I would (in English) say that box 1 is connected *to* box 2, *by* the
line.

Absolutely right. In fact I had tried to think of this same
description when the thread started, but couldn't get it down well
enough.

So here's what it looks like to me, using my own names instead of the
"to / by" confusion. When a handle on a line is connected to a
ConnectionPoint on a box, we have the following.

1) handle->connectees should be the list connection points connected
to that handle (i think this is currently implemented as
handle->connected_to)

2)connectionPoint->connectors should be the list of handles connected
to that connection point (curently ConnectionPoint->connected_by)

If this is true, then it's also natural that:

3) handle->owner should point to the line

4) ConnectionPoint->owner should point to the object that owns the
point (currently ConnectionPoint->object, which is definitely poor
naming, notwithstanding the expressive power of English)

In a connection, I am not sure who owns the connectionPoint. From an
earlier comment made by Hans, it seems that many objects can be
associated with a single ConnectionPoint, which makes no sense to me.
So its seems that number four is currently implemented as

4a) ConnectionPoint->connected which is the list of objects connected
at this point (but not the owner of the handle).

Sameer.
-- 
Research Scholar, Department of CSE, IIT Bombay
http://www.it.iitb.ac.in/~sameerds/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]