Haha! UI hangs and CPU spikes to the top; battery starts draining fast. <div><br></div><div>"That tingling means it's working!" </div><div><br></div><div>Only takes a couple of minutes, really. I suppose this is a question I'd have to ask eventually; is there a simple way to spin something like this off as a separate (green) thread, such that Morphic still responds while the job is running?<br>
<br><div class="gmail_quote">On Wed, Aug 4, 2010 at 11:42 PM, Andreas Raab <span dir="ltr"><<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 8/4/2010 11:25 PM, Casey Ransberger wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
rows := CSVParser parse: (FileStream readOnlyFileNamed:<br>
'/Users/casey/Desktop/SCDB_2010_01_justiceCentered_Vote.csv')<br>
</blockquote>
<br></div>
Try changing this to:<br>
<br>
file := FileStream readOnlyFileNamed: 'myfile.csv'.<br>
file converter: Latin1TextConverter new.<br>
rows := CSVParser parse: file.<br>
<br>
Cheers,<br><font color="#888888">
- Andreas</font><div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Got...<br>
<br>
"Error: invalid utf8 input detected"<br>
<br>
Relevant region of code might be...<br>
<br>
MultiByteFileStream>>next<br>
<br>
| char secondChar state |<br>
char := converter nextFromStream: self.<br>
<br>
<br>
converter is a UTF8TextConverter. Wondering if maybe I need a different<br>
text converter? Given that this is a CSV file, I'm thinking the system<br>
might be expecting UTF-8 where it's actually getting ASCII. The CSV<br>
package hasn't had any attention in a while, so that makes some sense<br>
(IIRC there was a shift to UTF-8 not very long ago, no?)<br>
<br>
If anyone is wondering, I'm playing with an idea around dynamic<br>
data-centric web interfaces:) and need some raw data to represent, hence<br>
the CSV file.<br>
<br>
Any ideas?<br>
--<br>
Casey Ransberger<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Casey Ransberger<br>
</div>