On Tuesday, March 5, 2019 at 2:31:22 AM UTC-8, Rahere wrote:
>
> Returning to TW after a break, I notice it still has ideosyncratic 
> file-writing, what you're currently doing is backwards, as the result of 
> lazy coding: MyFile, MyFile1...MyFileN. The headache you're causing is that 
> there is no pointer to the current live file, so when a user reloads, he's 
> reloading the outdated old copy. That's wrong, and was established as an 
> incorrect protocol nigh on 50 years ago. I date back to the days when we 
> were making fundamental decisions about the differentiation between 
> instructions and data, in passing: my first coding was on the Lyons Leo, 
> 20-column input cards (yes, that was before the 80-column ones, they had 
> sprocket holes in the header strip).
>

The current situation is not due to "lazy coding".  A great deal of effort 
has been put into addressing the issues surrounding file-writing from TW.  
What you have failed to recognize is that, because TW runs in a browser 
environment, it is VERY limited in the ways in which it can access the 
filesystem.

It's to be remembered that even the file index (directory, folder, 
> whatever) is simply another file containing data about what's actually on 
> disk somewhere: the name, the start point of the actual file, security 
> settings, dates and times, etc etc etc.
>

It's ALSO to be remembered that modern browsers no longer permit direct, 
programmatic access to this information.  We cannot create folders, read 
"file index" information, rename files, etc., so the "simple" file saving 
logic you outline -- which, by the way, is already VERY well understood by 
Jeremy, myself, and many other TW core contributors -- CANNOT be 
implemented using browser-based handling alone.

By default, the only standard cross-platform compatible way to write a file 
is to use the browser's intrinsic "download a file" handling.  Depending 
upon how you have configured your browser (and which browser/platform you 
are using), you may or may not be prompted for the 'target' filename for 
the "download saving" process, and any automatic file numbering (e.g. 
index, index (1), index (2), etc.) is determined by the file system, NOT 
the TW application.

Note: there ARE several other file-saving solutions that have been 
implemented that DO provide better control over file naming while saving, 
but these solutions generally require installing either a custom browser 
addon, or some kind of "wrapper/launcher" app that embeds a browser within 
a platform-specific executable that provides code for handling the file 
I/O. 

-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki: The Missing Manuals

P.S. By the way.... the first computer *I* programmed was a DEC PDP 8E via 
a KSR33 Teletype with *paper tape* punch/reader... and that was 42 years 
ago.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/2bec061c-1386-46f3-b1db-2c33eb06969b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to