Hi David I'm not surprised the encapsulation has turned out to be wrong. When we started trying to carve out the right bits of the file handling code to expose in jQuery it became clear that there wasn't a particularly clear boundary between what was generic and what was apparently unique to TiddlyWiki but might be relevant for other TiddlyWiki-like applications. Could you propose a patch to address the issues you've found?
Cheers Jeremy On Fri, Dec 17, 2010 at 4:35 PM, David Karger <[email protected]>wrote: > FND suggested that I post this to the TiddlyWikiDev group. Apparently > I've found an odd use for the TiddlyWiki codebase that is inconsistent with > the current code modularization. FND thought it would be worth describing > the situation as it might suggest some useful code refactoring. > > I'm using tiddlywiki's file save code to support the tw-inspired > application I announced a couple days ago---see Dido---a tiddlywikified > database > application<https://groups.google.com/forum/#topic/tiddlywikidev/uGn7XCqBz5A/discussion>. > Although apparently twFile.js is supposed to supersede FileSystem.js, > due to the current tw design I am using _both_ twFile.js and FileSystem.js > . I'm using $.twFile to do the actual save, but have to invoke getLocalPath > and its subroutines from FileSystem.js to identify the save path. I'm also > faced with having to copy the entire getLocalPath function out of > FileSystem.js so that I can eliminate the first line, which relies on > tiddlywiki's entire configuration system (config.options) to look up a > single parameter that I'd rather just set myself. Obviously I'd prefer to > use just the modern twFile.js code, but it's missing functionality I need to > save files. > > > > > -------- Original Message -------- Subject: Re: [twdev] Dido---a > tiddlywikified database application Date: Thu, 16 Dec 2010 19:15:13 +0100 > From: > FND <[email protected]> <[email protected]> To: David Karger > <[email protected]><[email protected]> > > > dido requires both files. it's using $.twFile to do the actual save, > > but it's using getLocalPath from FileSystem.js to identify the save > > path. [...] I wish that code had factored a little differently. > > That's very interesting - you might be the first one to use the code in > such capacity. It would be great if you could post those concerns to the > dev group*, then we could aim to refactor the code for improved reusability. > > > > -- Fred > > > * http://groups.google.com/group/TiddlyWikiDev/ > > -- > 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]<tiddlywikidev%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/tiddlywikidev?hl=en. > -- Jeremy Ruston mailto:[email protected] http://www.tiddlywiki.com -- 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.
