Shinobu Kawai said:
...
> I was going over the User Guide, and found that the Case Substitution
> example for get methods with parameters doesn't work.
>
> The following:
>
> ## Let's say that $data.getUser("jon") returns "Doe".
> $data.getUser("jon")
> ## is the same as
> $data.User("jon")
>
> produces:
>
> Doe
> $data.User("jon")
>
> and not the expected:
>
> Doe
> Doe
>
> This didn't work with the latest source in CVS, either.  Is this going
> to be implemented, or is it just a mistake in the documentation?
> Anybody knows?

if the documentation says that $data.User('jon') should work, then it is wrong
and i'm surprised it's gone so long unnoticed.  the short notation for methods
only works for the standard bean type methods.  so:

$foo.setFoo('foo')  can be changed to #set( $foo.foo = 'foo' )

$foo.getFoo() can be changed to either $foo.foo or $foo.Foo

and so on.  but:

$foo.getFoo('bar')  cannot be shortened at all.

and

$foo.thisIsNonStandard()  cannot be shortened at all.

if the user guide suggests otherwise, i'd recommend submitting a bugzilla
report and a patch to clarify/fix things.

Nathan Bubna
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to