[stringtemplate-interest] Turning off checkNullAttributeAgainstFormalArguments

Galen Dunkleberger galendunkleberger at gmail.com
Mon Jul 17 10:00:45 PDT 2006


I don't use group files. I use ST for web interface generation and so I have
many st files for pages and then common pieces of the interface broken out
into their own files which get included. There are occasions where I want to
have an enclosing template specify an override to some part of one of those
common interface pieces. Therefore in the common template I have an 'if'
statement something like.

 

 
$if(the_enclosing_template_specifies_this_overriden_argument)$

 
$the_enclosing_template_specifies_this_overriden_argument$

                              $else$

                                    $print_the_normal_stuff$

                              $endif$

 

That way I can do an include like

      

 
$common_piece(the_enclosing_template_specifies_this_overriden_argument={$pri
nt_something_different$})$

      

where I need to do an override and then just have 

                        

$common_piece()$

 

everywhere else.

 

The problem is that the checkNullAttributeAgainstFormalArguments ends up
throwing an exception for the enclosing templates that don't specify the
override. I am wonder if there could be a way to turn off the check in the
next version of ST. Since you can only define formal arguments when using a
group file I wouldn't expect the check to occur when not using a group file.
I would just expect the 'if' statement to evaluate to false since the
attribute doesn't exist.

 

                                          Thanks,

                                                Galen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20060717/18141311/attachment.html


More information about the stringtemplate-interest mailing list