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

Re: gEDA-user: rm=5mm in gattrib



> 
> I put "ceramic 50V, rm=5mm" (without quotes) into package attribute in
> gattrib and it saved into the file only "ceramic 50V, rm". Is this the
> intended behaviour?

Libgeda handles attributes in the following way.  An attribute is a
text string of form "foo=bar", stored as a single entity in the linked
list of graphical objects which represent your schematic.   In this
case, "foo" is the attribute name, and "bar" is the attribute value.
An attribute is not different from ordinary annotation text, except
that it has the "=" sign separating the attribute name from the
attribute value.  The "=" sign is what distinguishes an attribute from
normal text. 

Gattrib (through libgeda) will take your attribute value string and
store it alongside the attribute name.  Therefore, what you stored
into the linked list was something like the string 
"package=ceramic 50V, rm=5mm".  Libgeda will do unexpected things when
it finds an attribute (or a string) with an unexpected number of "="
signs in it.  In your case, it found the second "=" sign, and dropped
it and everything after it when it stored the result.

Is this the intended behaviour?  Well, it's the way gEDA was designed
to work.  Sure, I think the way gEDA/libgeda handles
attributes is a little sub-optimal.  However, re-architecting it is a
real pain, and most likely will never happen.

The moral of the story is:  don't put an "=" sign into the value field
of an attribute.

Stuart