On Wed, 2008-10-08 at 21:23 +0200, Werner Hoch wrote: > Hi Peter, > > On Mittwoch, 8. Oktober 2008, Peter Clifton wrote: > > On Wed, 2008-10-08 at 15:02 +0200, Werner Hoch wrote: > > > As Peter B. wrote, maybe the o_complex_get_promotable function > > > should just be a filter for an generic function that returns a list > > > of toplevel attribute objects. > > > > > > Thus the change of the component dialog wouldn't be required. > > > > I lost track already.. I thought we weren't looking specifically for > > promotable attributes. Clearly, the component selector uses a > > different filtering, so there is no need to re-use > > o_complex_get_promotable() for the component selector, and no > > immediate need to touch that code. > > We need a function that collects all attributes and a second that > filters the first list to fit the current requirements. > > In the current two functions o_complex_get_promotable and > o_complex_is_eligible_attribute things are mixed together a little bit.
Like this: http://repo.or.cz/w/geda-gaf/pcjc2.git?a=commitdiff;h=333917a672084c23e77b7a2f62616e6c516f2df8 It isn't much simpler, and in fact introduces a second iteration over the list. (One iteration over all OBJECTs to build the list, then iterate over that list to filter it). I should probably pick up the attempt I started at fixing / consolidating the mess of attribute handling API in gEDA. -- 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
