If I understand well, the answer is yes, using my patch of last December.
Lars, I know you're overwhelmed with patches, but you should remember you
posted it into the CVS tree! In fact it's there since last Dec. 15.
Paul, please check if this fit your needs: you can key extra attributes into
custom objects by doing a little XML editing in the shape file like in the
sample shapes/Circuit/hresistor.shape:
<ext_attributes>
<ext_attribute name="id" description="Circuit ID" type="string"/>
<ext_attribute name="ohms" description="Resistance (ohms)" type="int"/>
<ext_attribute name="power" description="Power dissipation (W)"
type="real"/>
<ext_attribute name="smd" description="SMD package" type="bool"/>
</ext_attributes>
Given this, you will be able to edit these values in the context menu
Object/Properties for each object of this type in your diagram. The values
(only the four types above, for now) will be saved in the diagram file as
standard properties and (of course) restored when you reopen it.
Please note, you won't find this patch in a ready-to-install Dia until 0.93
is released. Right now, you need to get a CVS snapshot and build it.
For more info and implementation details, you may check my messages and
answers in the list archives of Nov/Dec 2003.
Cheers
Marco
----- Original Message -----
From: "Lars Clausen"
Sent: Thursday, February 12, 2004 11:17 PM
On 12 Feb 2004, Paul D. Kroculick wrote:
> Is there an object that will allow me to enter custom properties?
>
> If I could find an object that let the user input a field of data that
> wasn't put on the drawing/screen, but did appear in the saved file, I
> would be very happy.
>
> I did see the UML-class, but that was overly complicated (for my
> application).
>
> Paul
>
> PS - I searched the mailing list archives, and I see others have asked
> this, but I couldn't find a definitive answer.
The definite answer is no, there isn't any such currently. Making one
could be either trivial, simple, or difficult, depending on what you want.
If you just want something like the 'Comment' field on the UML Class,
that's trivial. It's a text property that's not displayed.
If you want to be able to have an arbitrary number of such fields, there's
either the multi-line text field that a few objects use, or you would have
to do something like what the UML class does for operations, attributes etc
(for which a generalization has been worked on, but not much new recently).
If you want to be able to add different types of properties, like boolean,
integer, text, multiple selection etc, you'd need something that interfaces
with the properties system in interesting ways. That'd be work.
-Lars
--
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| HĂ„rdgrim of Numenor
"I do not agree with a word that you say, but I
|----------------------------
will defend to the death your right to say it." | Where are we going, and
--Evelyn Beatrice Hall paraphrasing Voltaire | what's with the
handbasket?
_______________________________________________
Dia-list mailing list
Dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.lysator.liu.se/~alla/dia/faq.html
Main page at http://www.lysator.liu.se/~alla/dia