Re: #def woes

Michael Higgins <[email protected]>
Newsgroups gmane.comp.python.cheetah
Message-ID <[email protected]>
#def foo($a)
<b>$a</b>
#end def

#set $faa = $getVar('foo', autoCall=False)
$faa('hi')


does what you want, I think.  I'm not sure if there's a more elegant  
approach directly in Cheetah, though of course you could write a  
convenience function so you don't have to type getVar blah blah blah  
all the time if you need to do this a lot.

Mike



On May 20, 2009, at 4:03 PM, [email protected] wrote:

> oops forgot autocalling
> so how do we give a function another name
>
> On Wed, May 20, 2009 at 10:36 AM, R. Tyler Ballance  
> <[email protected]> wrote:
> On Wed, May 20, 2009 at 03:46:57AM -0700, [email protected]  
> wrote:
> >    #def foo($a)
> >    <b>$a</b>
> >    #end def
> >
> >    #set faa = $foo
> >    $faa()
> >    this doesnt work?
> >    why not
>
>
> What do you expect this to do? Refer to the documentation for
> "autocalling"
>
> >    --
> >    Bidegg worlds best auction site
> >    http://bidegg.com
>
> >  
> ------------------------------------------------------------------------------
> > Crystal Reports - New Free Runtime and 30 Day Trial
> > Check out the new simplified licensing option that enables
> > unlimited royalty-free distribution of the report engine
> > for externally facing server and web deployment.
> > http://p.sf.net/sfu/businessobjects
> > _______________________________________________
> > Cheetahtemplate-discuss mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
>
>
> --
> -R. Tyler Ballance
> Slide, Inc.
>
>
>
> -- 
> Bidegg worlds best auction site
> http://bidegg.com
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables
> unlimited royalty-free distribution of the report engine
> for externally facing server and web deployment.
> http://p.sf.net/sfu/businessobjects_______________________________________________
> Cheetahtemplate-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.