Re: A WM brain bender
Marc Palmer <[email protected]>
| Newsgroups | gmane.comp.java.webmacro.user |
|---|---|
| Organization | AnyWare Ltd. |
| Message-ID | <[email protected]> |
Keats Kirsch wrote:
> Continuing the conversation with myself ...
>
> Another interesting option would be to change the #eval directive to
> work with Strings as well as Macros. (I would automatically convert the
> String to a StringMacro). This would be a simple change. The only
> downside is that it might make it a bit harder to catch some errors.
>
> Then you could simply say:
>
> #eval $content.Data using { "contextData": $someData }
>
> This is kind of cool. You could even do stuff like:
>
> #eval "Hello, $userName" using { "userName": $User.Name }
That would be the cleanest of them all. #eval was the first thing I tried.
However, is there a shortcut for #eval to make it pass in the caller's
context, so you don't have to pass all the stuff in?
I know, it's less safe... but we live in an imperfect world ;-)
Cheers
--
Marc Palmer - - - [email protected]
Wangjammers, J2ME Developers
~ http://www.wangjammers.org/games/
Blog
~ http://www.jroller.com/page/Wangjammer5
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click