You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alex Shneyderman <a....@gmail.com> on 2007/07/29 20:24:38 UTC

T5: Tutorial question.

Hi, all!

I am trying out tapestry and was going through the tutorial and
noticed that in the section about Guess.java the following:

  Object onActionFromLink(int guess)
  {
    _count++;

    if (guess == _target)
    {
      _gameOver.setup(_count);
      return _gameOver;
    }

    if (guess < _target)
      _message = String.format("%d is too low.", guess);
    else
      _message = String.format("%d is too high.", guess);

    return null;
  }


this however does not work. I changed the name of the handler to

  Object onAction(int guess)
  {
  ...
  }

and things started to work as expected. Did I miss something or it is
a mess up in tutorial.

-- 
Thanks,
Alex.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Tutorial question.

Posted by SergeEby <sd...@hotmail.com>.
Do a search in the mailing list. This question was answered a while ago.

/Serge
 

Alex Shneyderman wrote:
> 
> Hi, all!
> 
> I am trying out tapestry and was going through the tutorial and
> noticed that in the section about Guess.java the following:
> 
>   Object onActionFromLink(int guess)
>   {
>     _count++;
> 
>     if (guess == _target)
>     {
>       _gameOver.setup(_count);
>       return _gameOver;
>     }
> 
>     if (guess < _target)
>       _message = String.format("%d is too low.", guess);
>     else
>       _message = String.format("%d is too high.", guess);
> 
>     return null;
>   }
> 
> 
> this however does not work. I changed the name of the handler to
> 
>   Object onAction(int guess)
>   {
>   ...
>   }
> 
> and things started to work as expected. Did I miss something or it is
> a mess up in tutorial.
> 
> -- 
> Thanks,
> Alex.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-Tutorial-question.-tf4166391.html#a11854069
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org