Can anyone tell me why this code doesn’t work in Thunderbird 0.9 (I haven’t tried Firefox 1.0).
Note: There is a slash in the directory path C:, for some reason wordpress is fudging it up. MovableType did this crud too. So it’s not showing, but it’s there in the code.
Keep getting this error:
Error: uncaught exception: [Exception… “Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFileOutputStream.init]” nsresult: “0x80004005 (NS_ERROR_FAILURE)” location: “JS frame :: chrome://extension/content/extension.js :: testFileOutputStream :: line 12” data: no]
Simply want to be able to write to C: (or any place on my HD that I specify). Prefer not to use JSlib, simply because I don’t want dependencies. It’s really borderline insane to think you can’t do something as simple as write out to a file without depending on other lib’s.
Thanks in advance.
Comments/Email as usual.
3 replies on “Write File”
Hmm don’t really have time to look over that code, but why don’t you use MonkeySagee’s IO lib, it’s small and has everything you could need.
I know it works in TB as that is what we use for QuickNote.
If you’d rather not use it, I’m sure it will point you in the right direction on what you need to add/change.
http://www.mozdev.org/source/b.....web-markup
Cheers
-Jed π
Wild speculation: you said there was a backslash, but don’t you need to put a double-backslash? Otherwise the \ just escapes (needlessly) the : following it and never actually makes it anywhere… so it would be attempting to output to “C:foo.txt” ?
Of course you might well be doing that already, in which case ignore this comment π
I have been anxiously awaiting Google’s web browser’s widgets for months it seems – At this point I have played with 5 extensions and am awed with the plugins. FF has always slowed down & the extensions are welcomed.