[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gEDA: New autonumber text dialog
Hi Ales,
On Monday 07 March 2005 00:09, Ales Hvezda wrote:
> I spent some time playing with your Autonumber Text... dialog box.
> Quite nifty.
>
> Minor nit, you may want to switch the order of "close" and "apply"
> as every other dialog box in gschem has "apply" (or okay) on the left
> and then close on the right.
changed.
> [snip]
>
> >Please test it and let me know whether you like it or if there are
> > any bugs in it.
>
> I opened up your gschem/tests/autonumber.sch and executed
> Attribute/Autonumber Text... with:
>
> - refdes=R selectd
> - current page
>
> and pressed Apply and then it worked just fine.
>
> However, the following schematic causes a hang (and sometimes a core
> dump):
>
> v 20041228 1
> C 36200 51600 1 0 0 block.sym
> {
> T 36700 52000 5 10 1 1 0 0 1
> refdes=U?
> T 35800 51400 5 10 1 0 0 0 1
> source=autonumber_sub2.sch
> }
> C 33400 51600 1 0 0 block.sym
> {
> T 33900 51900 5 10 1 1 0 0 1
> refdes=U?
> T 32800 51400 5 10 1 0 0 0 1
> source=autonumber_sub1.sch
> }
>
> I opened up the above and Attribute/Autonumber Text... with:
>
> - refdes=R selectd
> - current page
>
> and pressed Apply and gschem froze.
Oops, I forgot the error handling if gschem does not find source pages.
Changed in CVS.
> Note: I did _not_ have a gafrc with a source-library set. I wouldn't
> expect gschem to care if it can't go into the lower sheets, if I have
> "current sheet" selected in the Autonumber Text... dialog.
Well, the function collects the used numbers. Even if I don't renumber
text in lower hierarchies I collect the used numbers as I don't want to
use them twice (in the current and the lower hierachys).
Hmmm, do the people want to have duplicate numbers sometimes?
> >Special code organisation question:
> >I put some constants at the beginning of the o_misc.nw file. Where
> > shall I put them?
> >Is it better to use enums or definitions?
>
> If the defines are private to the functions in o_misc.nw, then
> putting them there is just fine.
Ok.
Something came in my mind. The function might still crash if there are
dependancy loops in the hierarchy. (not tested).
schematic1.sch references schematic2.sch
and
schematic2 references schematic1.sch
Shall I handle that error, too? That would take some time.
regards
Werner