Re: Named connection points



On Fri, Feb 17, 2012 at 7:00 AM,  <dia-list-request gnome org> wrote:
Date: Thu, 16 Feb 2012 10:07:02 -0500
From: Dan Katz <dpkatz bc gmail com>

A bit of context: I'm writing a Python plug-in for Dia which
translates a data-flow diagram to code in a home-grown legacy
job-control language. The plugin is exposed as an export filter (like

The annoyance comes when I want to differentiate among the connection
points in the back-end pass of the Python code generator. I'd like to
be able to name the connection points as part of the custom object
definition (e.g. 'minuend', 'subtrahend', 'difference') and then ?then
get them by name in the Python API.

to implement semantics for non-commutative
operations (subtraction, division, exponentiation, patch application,
etc.) being able to know which CP is which matters a lot.

The check-in comment removing named CPs claimed lack of use in
the core objects and some memory savings as the rationale for deleting
them. My use case, though, involves custom objects rather than core
objects, and I'm not sure that the memory savings is that big a deal
(although you folks would know better).

I assume you have confirmed that connection points are not
consistently numbered. I was, apparrantly erroniously, under the
impression that the numbering was based on the shape definition so
that, for example, your "minuend" CP would always be 1, subtrahend = 2
and difference = 3, no matter which way the shape was flipped or
rotated.

Many of the core shapes do have definate inputs and outputs,
especially the electronics shapes. While I doubt Dia is used for more
than simple schematics, I can see value in symbolically labeling the
CPs of various flow diagram shapes, though often, the purpose of each
CP can be correctly infered from the labels on the lines between
shapes.

I would be in favor of bringing back symbolically labels CPs, or at
least insuring they are numbered in the diagram in the same order they
are defined in the shape definition.



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