Error in tokenize when used as indicated in documentation

14 views
Skip to first unread message

shop.servic...@gmail.com

unread,
Jun 15, 2017, 6:18:38 PM6/15/17
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device

IDE: NetBeans 8.2
Desktop OS Windows 10
Simulator
Device IOS & Android

Can you please provide me a complete example code that will split a String as found in Java 1.8 Split method?

I have seen reference to: (response is a String)


com.codename1.ui.List<String> list1 = com.codename1.util.StringUtil.tokenize(response, "<<EOL>>") ;


Generates This error: incompatible types: java.util.List<String> cannot be converted to com.codename1.ui.List<String>

Shai Almog

unread,
Jun 16, 2017, 2:23:54 AM6/16/17
to CodenameOne Discussions, shop.servic...@gmail.com
You need to import java.util.List not com.codename1.ui.List in your import statements.

shop.servic...@gmail.com

unread,
Jun 16, 2017, 8:55:20 AM6/16/17
to CodenameOne Discussions, shop.servic...@gmail.com
Thanks, I read another Post of yours indicating the Util.split method which seems to behave like the java String Class split.

Regards.
Reply all
Reply to author
Forward
0 new messages