Hi,
I am relatively new to GWT, I apologize if my doubt sounds juvenile.
I have a requirement where I need to append contents to a String in a
Button's ClickHandler. In the ClickHandler, i do something like this :
String string = "";
for(int i=0; i<Panel.getWidgetCount(); i++)
{
Label l = (Label)Panel.getWidget(i);
string = rb.getText();
}
I do this because the number of labels in the panel is decided at run-
time only. My problem is that i want this "string" to be available
outside the scope of the Button's ClickHandler. If i declare "string"
outside the ClickHandler, i cannot access it because it is a non-final
variable. If i use the keyword final with"string", i cannot modify it
within the ClickHandler.
What can i do here? I apologize once again if this sounds silly but i
couldn't find a solution anywhere.
Any help would be greatly appreciated.
Thanks in advance.
Regards,
Gautam
--
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.