I can find a hundred examples of reading a delimited file and bring it into an array, but how do I get delimited data out of a string?
Basically, my app is yanking data from a web server to populate a table. I can spit this data out however the heck I need too, but no matter what I do, I can’t seem to do what I want.
This seems to work just fine:
set content of table view 1 of scroll view "theTable" of window "main" to {{"abc","123","xyz"}{"abc","123","xyz"}{"abc","123","xyz"}{"abc","123","xyz"}}
This doesn’t:
set dataSource to do shell script "curl [url=http://mydomain.com/data/fetch.php]http://mydomain.com/data/fetch.php"[/url]
set content of table view 1 of scroll view "theTable" of window "main" to dataSource
In the last example, I have tried all various types of things, like giving the output of my php file to be “{{“abc”,“123”,“xyz”}{“abc”,“123”,“xyz”}{“abc”,“123”,“xyz”}{“abc”,“123”,“xyz”}}” or even “1,2,3/n4,5,6/n” and using some code to slice and dice that, but no luck.
Any help or advice!? Please… Newbie I am.