Hi Jason, > I didn't do any TT testing, so I apologize for that -- I didn't know it > doesn't like variables that start with underscores.
It is actually (believe it or not) a feature. The idea is that you can make certain elements in the data structure private so that they're not accessible from within the template. This works: [% user.name %] This doesn't: [% user._some_private_method %] It's obviously not perfect, because you can still call: [% user.delete %] But it's at least a nod to protection of private data/methods. > So I added a branch > in the callback code to look for cgiapp's __TT_OBJECT variable and if > it's there, it puts in the param without underscores. Unfortunately, this won't work with AnyTemplate+TT. In fact, I can't think of how you would use the load_tmpl hook to determine the template type when using AnyTemplate. > So I'm thinking of breaking backwards compatibility so I don't have to > feel dirty when using that __TT_OBJECT variable and dumb down the > variable name to not use underscores. I think that would be the best approach. It's also possible that HTDot might eventually get the underscore==private feature as well (for compatibility with TT). > I'll put the for_template idea on my TODO. Thanks! Michael --- Michael Graham <[EMAIL PROTECTED]> --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[email protected]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
