On Tue, 2008-10-07 at 19:58 +0200, Werner Hoch wrote:
> On Dienstag, 7. Oktober 2008, Peter Clifton wrote:
> > On Tue, 2008-10-07 at 09:02 +0200, Werner Hoch wrote:
> > > I'd use the same space separated list of attributes as the
> > > always-promote-attributes variable in libgeda.
> >
> > Why does the attribute viewer need to use that list directly?
>
> I've tried to say that I'd use the same format, not the same list.
> Sorry for the confusion.
I'm slightly confused why we need to define a filter for this view, and
why you'd want to continue with this (bug/feature). Why not accept a
scheme list if you need to:
(define-show-list '("atttib1 " "attrib 2" "attrib 3"))
Or whatever the scheme list syntax is.. I can't recall.
> > See the recently added function:
>
> > GList *o_complex_get_promotable (TOPLEVEL *toplevel, OBJECT *object,
> > int detach);
>
> I've looked into it. But I think I cannot use it. If a symbol is opened
> directly the attributes are just plain text objects. Not elements of a
> component.
Good point.
Well, I guess we could convert the component selector to opening the
symbol with some equivelant to o_complex_new (), then grabbing them as
real attributes. It would make the code handling it more generic with
the rest of gschem's attribute handling.
That function would work as long as you can call it with some COMPLEX
type object with OBJECT->prim_objs pointing towards the symbol's
objects. I'd suggest o_complex_new () directly, but that creates a
symbol by name, not by its CLib resource. Might not be a big issue
though.
> Yes, but I think we should just refine the definition of the attribute
> syntax with an additional phrase:
> http://geda.seul.org/wiki/geda:file_format_spec#attributes
>
> e.g.
> "The name of the attribute must match the regex '[A-Za-z][a-z0-9-_]*'.
> The attribute name is case sensitiv."
>
> I think this is true for all currently used attribute names out there.
> Note: I've added the "-" because spice-sdb uses the attribute
> name "model-name".
> http://www.geda.seul.org/wiki/geda:sdb_howto#gschem_attributes_for_spice_netlisting
The current parser allows whitespace if it isn't at the ends of the
attribute name. I can't think of any examples of real-world usage, but
we have to be VERY careful if we change the legality of these names.
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev