flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurice Amsellem <maurice.amsel...@systar.com>
Subject RE:FileReference and URLRequest
Date Mon, 23 Jun 2014 21:23:20 GMT
Sorry, I overlooked the tutorial, which explains how to assign directly the data to parse,
using the public data variable.

https://code.google.com/p/csvlib/wiki/QuickStart  (internal csv format string example)

So you could first load the csv data using filerefence, then set data, then call decode
________________________________________
De : Maurice Amsellem [maurice.amsellem@systar.com]
Envoyé : lundi 23 juin 2014 23:16
À : users@flex.apache.org
Objet : RE:FileReference and URLRequest

I think it was not a good idea in the first place to derive csv from urlloader, because it
does not allow it to work with local files.

So my advice, given that  csvlib is open source, is to extract the useful parsing code from
the lib, and write your own

Maurice
________________________________________
De : Oleg Konovalov [olegkon@gmail.com]
Envoyé : lundi 23 juin 2014 21:14
À : users@flex.apache.org
Objet : Re: FileReference and URLRequest

Forgot to mention:
class CSV extends URLLoader, that is where csv.load(request:URLRequest)
coming from.
On Jun 23, 2014 3:02 PM, "Oleg Konovalov" <olegkon@gmail.com> wrote:

> Hi,
>
> I am trying to implement import CSV data into Flex Web app using CSVLIB,
> so it allows me to parse commas inside cells when it is surrounded by
> double quotes.
> It seems that the only way to load data in CSV is:  csv.load(new
> URLRequest(url:String)).
> So if I select some file from my local drive, say file1.csv from c:/temp,
> how can I put it in URL.
> File reference returns only selected filename without the path when I use
> fr.browse().  fr.name()
> And fr.browseForDirectory() is AIR only.
> So how can I get a full path+fileName to pass to URLRequest?
>
> Please help!
>
> TIA,
> Oleg
> P.S.: no ByteArray used in CSVLib.
> Using Flex 4.5.1
>
Mime
View raw message