Yellow Jersey wrote:
> Hi,
>
> If someone could help me understand this code snippet from
> StockWatcher app.
> I cannot in particular understand the line marked "THIS LINE".
>
>
> Button removeStock = new Button("x");
> removeStock.addClickListener(new ClickListener(){
> public void onClick(Widget sender) {
> int removedIndex = stocks.indexOf(symbol); // <- THIS
> LINE
> stocks.remove(removedIndex);
> stocksFlexTable.removeRow(removedIndex+1);
> }
> });
>
>
Your code snippet isn't enough on its own to understand what's going on - you
also need the
definition of "stocks". Perhaps this is your problem. It's defined like this:
private ArrayList<String> stocks = new ArrayList<String>();
Does that help you to see what's happening?
Paul
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---