thx for your tips; finally I found out that the problem was because of
using a global variable. Now all is working, thank you :)

On 21 oct, 15:00, Lothar Kimmeringer <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
>
> > if I create a new iterator inside the onClick-method:
>
> >                 final List list = question.getAnswers();
>
> >            sendAnswer.addClickListener(new ClickListener() {
> >                    public void onClick(Widget sender) {
>
> >                            final ListIterator testlist = 
> > list.listIterator();
> >                            System.out.println("#5 New ListIterator has next 
> > inside the
> > listener?: " + testlist.hasNext());
> >                    }
> >            });
>
> > I get this output:
> > #5 New ListIterator has next inside the listener?: false
>
> ... and if you output the number of elements in the list
> with quesiton.size()?
> If the number is zero, this result isn't much surprising.
> If question.getAnswers creates a new list for every call,
> the list when creating the GUI should be empty, so in that
> case you should put in the list-creation into the onClick-
> method itself.
>
> Regards, Lothar
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to