>> * $macro.parametersAsString.foo to get
the string value parameter
I don't think we really need that. Also it does not make much sense
from API point of view since the input parameter value before
conversion is not String but Object, macros coming from a wiki source
will be Strings but it's just a use case.
If we want to provider devs with a way to get the String
representation of any property we can introduce a
$services.properties.toString($value) for example.
>
>
> Could you tell me if you agree with all those changes?
Sounds good.
Actually I’m hesitating because we said we didn’t want to expose bindings directly in
the velocity context.
So $services.macro might be better since $services is reserved.
Imagine an existing wiki macro doing:
#set ($macro = “….”)
You would break it.
Why ?
It's not because the macro binding is already set before the execution
of the macro that the #set will crash.
Thanks
-Vincent
> I’m wondering if I wouldn’t prefer the following:
>
> * $macro.parameters.foo.value() <- typed
-1, it's way too complex for what is supposed to be the thing you want
to to pretty much all the time
*
$macro.parameters.foo.rawValue() or toString() <- string, as specified by the user when
using the macro
$macro.parameters.foo would return some MacroParameter object.
Note that $macro.parameters.foo when used in a string context would call
$macro.parameters.foo.toString() which would return the raw value.
Thanks
-Vincent
>
> Thanks,
> Simon
>
>
> --
> Simon Urli
> Software Engineer at XWiki SAS
> simon.urli(a)xwiki.com
> More about us at
http://www.xwiki.com
--
Simon Urli
Software Engineer at XWiki SAS
simon.urli(a)xwiki.com
More about us at