> Hopefully someone with jQuery.twFile.js working experience will comment to > help us. > > I have been working on an program to do almost exactly the same thing. I > have a need to read, modify and write many XML files within a closed > network. I have a batch file that will go out to the attached network drive > and create a directory tree of files that might need modification and saves > the result to a text file. I have been able to read in that file using the > XMLHttpRequest method. I initially tried to use that and then > jQuery.twFile.js for writing. > > When that failed, I looked further and found that jQuery.twFile.js as > currently posted on > http://svn.tiddlywiki.org/Trunk/core/jquery/plugins/jQuery.twFile.js is > different from the jQuery.twFile.js included within the Demo at > http://jquery.tiddlywiki.org/twFileDemo.html . The Demo code appears to be > more recent, but the included version of jQuery is older than current.
Ouch, I'm sorry the files are in disarray. We've pretty much moved TiddlyWiki to github, and so I believe that the latest versions of the plugin will be here: https://github.com/TiddlyWiki/tiddlywiki/tree/master/jquery/plugins And the latest version of the TiddlySaver applet is here: https://github.com/TiddlyWiki/tiddlywiki/tree/master/java Ideally, we should establish a new tiddlywiki/twfile repo that adds the demo file and is symbolically linked into the tiddlywiki/tiddlywiki repo. > While trying to debug the situation, it appears there are some assumptions > or dependencies regarding what kind of file and file format can be read and > written. The main limitation of the code is that it only works reliably across platforms with plain text files, and on IE those text files must be limited to the 0-255 ANSI character set. The TiddlyWiki core code on IE carefully uses entity encodings to avoid having Unicode in the content area of a TiddlyWiki file. TiddlyWiki also takes advantage of the way that many encoding issues are masked by the way that TiddlyWiki works: it only ever loads a file, splices the new tiddler content into the string, and then re-saves it. For that reason, stray Unicode characters in the body of the file work happily survive a load-process-save cycle because the mis-encoding happens on both the load and the save, cancelling each other out. > I can demonstrate the Demo works. If I replace the Demo file HTML > and javascript with my HTML and javascript, jQuery.twFile.js seems to fail > by selecting the wrong driver function. I am using Chrome (current dev > channel). I have rewritten the driver selection to force TiddlySaver, but > then jQuery.twFile.js still fails to get into the read or write functions. > Based on what I see from some strategic console.log() statements, it seems > like it might be failing on driver isAvailable = null. What bothers me is > that the .js and .jar portions of all this work for the demo. I deliberately > did not change anything but the HTML and the last script portion of the > demo. It's pretty hopeful that you've got the demo working. Can you share your modified code? You're welcome to email it directly to me if you don't want to post it here, Best wishes Jeremy > If this a hijack, my apologies. Best wishes Jeremy > > Comments? Anyone? > > Brian > > > On Friday, June 29, 2012 12:45:22 PM UTC-4, DarrenNavitas wrote: >> >> Hi All, >> >> Just wondering on the current state of play for the jquery.twFile plugin. >> >> I have a simple web page the needs to read and update an XML file stored >> on the local network. The web page is hosted on an intranet server that can >> physically see the XML file. >> >> Using jquery and the jquery.twFile plug in, I have written a very simple >> html page that attempts to read the XML file and allow the user to update >> the contents. >> >> Initially I tried just using standard jquery ajax calls to grab the XML >> file - and this all worked fine when the html file was running locally. As >> soon as it was hosted on the intranet server I go the usual cross domain >> issues etc. The twFile plugin seemed the perfect answer - and having >> implemented it, it's working perfectly in IE. >> >> However both Chrome and Firefox can't even load the XML file. In trying >> various things, I've tried to get the page to even load a txt file in the >> same directory as the html page - but still no luck. >> >> I have the jar file in the same directory for Chrome - and on the first >> run it installed the required Java components - but it's just not working. >> >> I was hoping twfile would be the answer - as I don't want to go to all the >> hassle of creating a web service that will perform the read / write >> functions - I just wanted to do it client side seeing as it all on the same >> local network!! >> >> Cheers for any help! > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWikiDev" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/tiddlywikidev/-/M2nIbLLEZrkJ. > > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/tiddlywikidev?hl=en. -- Jeremy Ruston mailto:[email protected] -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywikidev?hl=en.
