IOS split()

I have a string data =" this is a test"
the following line
dim tmp(-1) as text
tmp=split(data," ")

results in there is more than one item with this name and its not clear to which this refers, I have changed the name many times, there are no names to which it conflicts? any ideas?

[quote=155604:@dave duke]I have a string data =" this is a test"
the following line
dim tmp(-1) as text
tmp=split(data," ")

results in there is more than one item with this name and its not clear to which this refers, I have changed the name many times, there are no names to which it conflicts? any ideas?[/quote]

This not the right syntax. See http://xojo.helpdocsonline.com/text$Split

data.Split(" ")

You must understand that iOS is using the new framework, that has a different syntax for a lot of commands. I strongly recommend you keep the link I posted above to iOS documentation for reference.

One way to keep the older syntax is to wrap the new framework into methods that mimic the old one.

I have shared a wrapper that I started for my own use, and just added split() to it so the code you posted can run.

See GitHub - Mitchboo/XojoiOSWrapper: Module that brings legacy and additional functions to Xojo iOS

Plus the desktop DOES support that syntax as well

dim v() as string
dim s as string="a,b,c"

v=s.split(",")

or 

v=split(s,",")

[quote=155604:@dave duke]I have a string data =" this is a test"
the following line
dim tmp(-1) as text
tmp=split(data," ")

results in there is more than one item with this name and its not clear to which this refers, I have changed the name many times, there are no names to which it conflicts? any ideas?[/quote]

DIM tmp(-1) As String

Please correct me, but as far as I know there is no such thing “as text”? But maybe it’s not the question…?

[quote=157002:@Jakob Krabbe]DIM tmp(-1) As String

Please correct me, but as far as I know there is no such thing “as text”? But maybe it’s not the question…?[/quote]

This should have been posted in the iOS channel. In the new iOS framework, string no longer exist, and has been superseded byt the Text type.