« Return to Thread: A controller qustion

Re: A controller qustion

by Sonny To :: Rate this Message:

Reply to Author | View in Thread

this should be fine... u are probably defining item in the outter scope

On Fri, May 16, 2008 at 10:37 AM, Fox Woo <foxwu718@...> wrote:

> Hi,
>    I define tow methods in my controller:
>       def revise = {
>             def item
>              // blah blah
> }
>    def check = {
>             def item
>              // blah blah
> }
> When I compile the code I got the exception: The current
> scope already contains a variable of the name item.
> Dose it mean I can not define a local variable which is accessible within
> the method
>
> --
> 爱生活,爱FOX

 « Return to Thread: A controller qustion