Tuesday, June 24, 2014

Re: StringTokenizer in GWT

StringTokenizer is not depracatd though. There is also a good reason for this, as it is quite faster than the split method.

Check a comparison


Dne petek, 01. avgust 2008 04:48:17 UTC+2 je oseba Kroc napisala:
I don't know for this error.

but from javadoc API you can read this:
StringTokenizer is a legacy class that is retained for compatibility
reasons although its use is discouraged in new code. It is recommended
that anyone seeking this functionality use the split  method of String
or the java.util.regex package instead.

So, try other method.
I'm sucessfully using split method.

Vincent

On 1 août, 10:12, Anti <zer...@gmail.com> wrote:
> Hello Everybody,
>
> StringTokenizer is very useful but seems I cannot use it in GWT, these
> lines of code:
>
>                         StringTokenizer stringTokenizer = new
> StringTokenizer(sender.getFileName(), "\\");
>                         while(stringTokenizer.hasMoreTokens()){
>                                 shortName = stringTokenizer.nextToken();
>                         }
>
> throw...:
>
> Line 72:  No source code is available for type
> java.util.StringTokenizer; did you forget to inherit a required
> module?
>
> What can I do?
>
> Thanks.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment