QML and IOJOb

Michał "rysiek" Woźniak rysiek at fwioo.pl
Sun Nov 3 19:42:28 UTC 2013


Dnia niedziela, 3 listopada 2013 10:36:35 Aaron J. Seigo pisze:
> On Saturday, November 2, 2013 21:20:56 Michał rysiek Woźniak wrote:
> > Hello,
> > 
> > After a while I came back to a little project of mine, and am trying to
> > add
> > loading and saving data from it (a serialised JSON object) from/to a file.
> > 
> > I am using FileDialog, LocalIO and IOJobs extentions:
> > http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API-LocalI
> > O
> > http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API-IOJobs
> > 
> > Two issues I cannot seem to get over:
> > 
> > 1. Upon reading a file (i.e. in data() signal handler) is there a way to
> > check what encoding the file or the data is likely in, and to properly
> > handle it? my data is in UTF-8 (of course), but once loaded it is not
> > displayed correctly.
> 
> encoding is not handled, no.

I should write my own encoding discovery and handling code, then?

> > 2. Is there anyway at all to actually *write* data out to a file? Cannot
> > seem to find it, even though there is a SaveFileDialog().
> 
> random access I/O stile write? no. the save dialog is there to give
> destinations to things that do (e.g. http requests)

Okay, thanks.

-- 
Pozdr
rysiek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 316 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20131103/f8a236ce/attachment.sig>


More information about the Plasma-devel mailing list