Skip to main content

Incompatible types error on String.split()

1 reply [Last post]
epatardeccom
Offline
Joined: 2007-11-01
Points: 0

Compiling the following produces an error:
...
8 var str:String = "a,b,c,d";
9 var args:String[] = str.split(",");
...
----compile error------

Test.fx:9: incompatible types
found : java.lang.String[]
required: java.lang.String
var args:String[] = str.split(",");

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jim_weaver
Offline
Joined: 2007-05-18
Points: 0

This is a known issue (see JIRA JFXC-555 http://openjfx.java.sun.com/jira/browse/JFXC-555), and is slated to be addressed in the Milestone 3 release if not sooner.

Thanks,
Jim Weaver
bootcamp.JavaFXpert.com