It may not be obvious how to call Smalltalk code from Etoys. It's rather simple.

Any object's script can be changed to Smalltalk text and then more Smalltalk code can be added and saved there. 

For example, attached are photos of the button script that moves a Star object to a position on the World coordinates.
Inline image 1

Selecting the White menu button in the top right corner you get this menu:

Inline image 2 

Choose "show code textually" and you get the Smalltalk equivalent. 

Inline image 3

Now you can replace the Smalltalk code that moves the star with the Smalltalk code you want to execute to load the CSV file ... into some text object for example.

- Darius 



On Tue, Apr 30, 2013 at 12:59 PM, Ricardo Moran <richi.moran@gmail.com> wrote:
Hi Luis,

For CSV files you can see that Physical Etoys includes Skeleton with a few changes that allow a spreadsheet to import/export csv data from external files. If you want to use that in Etoys you can load this file: http://source.squeak.org/etoysinbox/Skeleton-Richo.10.mcz and look for the "data i/o" category on the Skeleton spreadsheet.

For XML, I'm afraid you'll have to get your hands dirty and write some smalltalk code :)
I don't know your smalltalk knowledge, but here it's a simple example that might help you get started, let me know if you need more help:

xml := XMLDOMParser parseDocumentFrom: '
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don''t forget me this weekend!</body>
</note>' readStream.
xml explore.

Cheers,
Richo


On Mon, Apr 29, 2013 at 5:51 PM, Luis Valente <is.valente@gmail.com> wrote:
Hi all,

I have a project where I need to read data that is in an external file, that file will be in CSV or XML format. I don't know how to do this nor if it is possible in Etoys? Who can give ma a hand with a detailed explanation?
Thank you,


All the best,
Luís Valente