yeah, we ran into that. i imagine it is due to the order macros are added. while it never seemed to cause any problems, we were able to eschew the reported errors by rearranging the order in which our macros are declared. but that doesn't appear possible with the example you give.
Nathan Bubna [EMAIL PROTECTED] ----- Original Message ----- From: "Darin Kelkhoff" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 12, 2001 2:57 PM Subject: too few arguments to macro errors > using 1.2, RC2, we have a macro library file with close to 100 macros in it. > when the library is parsed, in the log foreach macro we get a message like > this: > > > Mon Nov 12 16:27:18 CST 2001 [info] Velocimacro : added new VM : > #spacer( ) : source = build/com/tsn/templates/primary_macro_lib > > > there are ~100 lines just like this in sequence in our log. > Then, however, after all these lines a new series of lines appear in the log. > they are all in the format: > > > Mon Nov 12 16:27:18 CST 2001 [error] VM #spacer: error : too few arguments > to macro. Wanted 3 got 0 --> > > > these lines always complain that macro had too few arguments, but all our > templates are rendering fine, all our macro calls are not incorrect. > > when i further inspected the situation, i noticed that for each macro, it > would generate the error message once for each time that macro was referred > to in the library file before where that macro was defined. here's an > example: > > > #macro(A $a) > #B(2) > #C(3) > #end > #macro(B $b) > #A(1) > #C(3) > #end > #macro(C $c) > #A(1) > #B(2) > #end > > this would generate in the log something like: > > ...added new VM : #A( )... > ...added new VM : #B( )... > ...added new VM : #C( )... > ...VM #B: error : too few arguments... > ...VM #C: error : too few arguments... > ...VM #C: error : too few arguments... > > > at least, thats as closely as i can reproduce the situation. > > does this sound like a problem with our code? has anyone else seen something > like this? any ideas? > > any help is appreciated, > --darin > > > > > -- > Darin Kelkhoff > [EMAIL PROTECTED] > Programmer > The Sporting News > www.sportingnews.com > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>