IO extensions should accept Writers
Hello
I strongly believe Inkscape input and output extensions should accept Writers, not URIs. Currently much of Gnome-VFS boilerplate is duplicated between the extensions. If we used Writers instead of URIs: 1. The GnomeVFS code would be contained to a particular OutputStream, and could be easily replaced with GVFS once it's around. 2. Adding KIO support would be easy, just create a new OutputStream and use it. There could be a function that automatically creates the best OutputStream for a given platform. 3. Memory output ability - this is what I need for the clipboard work. 4. Windows-specific filename hacking could be contained to a particular OutputStream.
Regards, Krzysztof (Chris) Kosiński
On Fri, 2008-03-14 at 01:40 -0700, Krzysztof Kosiński wrote:
I strongly believe Inkscape input and output extensions should accept Writers, not URIs. Currently much of Gnome-VFS boilerplate is duplicated between the extensions. If we used Writers instead of URIs:
- The GnomeVFS code would be contained to a particular OutputStream, and
could be easily replaced with GVFS once it's around. 2. Adding KIO support would be easy, just create a new OutputStream and use it. There could be a function that automatically creates the best OutputStream for a given platform. 3. Memory output ability - this is what I need for the clipboard work. 4. Windows-specific filename hacking could be contained to a particular OutputStream.
That's interesting, I'd be interested in looking at how you think that'd work. Part of the reasons that it was done that way was historical, but I think all of those problems are fixed with the async interactions that we have today.
We will have to provide some backwards compatibility though, as there are many extensions that are outside of the code tree. I don't think that will be a huge deal though, and it's only for the scripting interface.
--Ted
participants (2)
-
Krzysztof Kosiński
-
Ted Gould