Hi Yakov

There are two ways that TiddlyWiki can interact with a server:

1. By saving the entire file to the server (this is how TiddlySpot works,
and the iPhone/iPad app TWEdit)
2. By syncing changes to individual tiddlers to the server (this is how
TiddlyWeb/TiddlySpace works)

I would expect AndTidWiki to work using the first technique. Typically that
would be done by injecting code that overrides the saveChanges function, or
the lower level saveFile/loadFile functions.

You can see an example of the technique in the source to TiddlyFox. This is
the javascript file that TiddlyFox injects into TiddlyWiki documents:

https://github.com/TiddlyWiki/TiddlyFox/blob/master/content/inject.js

You can see the internal functions being overridden at lines 50 to 53.

Best wishes

Jeremy




On Thu, Aug 15, 2013 at 12:27 AM, Yakov <[email protected]>wrote:

>
>
> пятница, 2 августа 2013 г., 14:27:41 UTC+4 пользователь Jeremy Ruston
> написал:
>
>> понедельник, 29 июля 2013 г., 15:43:02 UTC+4 пользователь Arlen Beiler
>>> написал:
>>>
>>>> Using TiddlyWiki5 which I just downloaded in AndTidWiki, I can edit
>>>> fine, but when I try to save it, I get an Internal Javascript Error.
>>>> "Uncaught TypeError: Cannot call method 'getItem' of null".
>>>>
>>>> That's unfortunate. Theoretically it's possible to "emulate" the saving
>>> engine of TWc in TW5 by a plugin, but that's far from my knowledge (I
>>> haven't researched TW5 core yet, and also don't quite understand how ATW
>>> and TW interact).
>>>
>>
>> I agree that we should be able to make TW5 work with the existing
>> AndTidWiki app. I don't have an Android device for testing, and have had
>> bad experiences in the past with the poor performance of the Android
>> emulator. So I'd be very grateful if anyone can help with information on
>> the way that AndTidWiki works.
>>
>> Hi Jeremy,
>
> I'm not familiar with how TiddlyWiki interacts with any server side, so
> may be you can help me with that first..
>
> the chain
> config.macros.saveChanges.onClick - saveChanges - saveMain - saveFile - ...
> doesn't seem to have anything that's "awaiting" server side, so
>
> my only guess on where server side can jump in is
>
> TiddlyWiki.prototype.allTiddlersAsHtml - TiddlyWiki.prototype.getSaver -
> TW21Saver/some other saver - .externalize - .externalizeTiddler
>
> so is it true that usually server sides create their own SaverBase
> instance with their own externalizeTiddler method and change
> TiddlyWiki.prototype.getSaver and that's how they make TW use some new
> functionality to save? Or is it done somehow else?
>
> Best regards,
> Yakov.
>
>
>>
>>
>>>
>>>> On Mon, Jul 29, 2013 at 4:39 AM, Yakov <yakov.litv...@gmail.**com>wrote:
>>>>
>>>>> Hi Leo,
>>>>>
>>>>> by the way, have you tried AndTidWiki? As for now, I only use
>>>>> TiddlyWiki Classic on Android, so don't know if TW5 works with it. As a
>>>>> side note: with AndTidWiki, I only have to add ToggleLeft/RightSidebar 
>>>>> [1],
>>>>> add a line-menu on top by changing PageTemplate and a few CSS adjustments,
>>>>> while FireFox needs some more work on styles (in fact, I need to create a
>>>>> plugin which will apply different styles depending on what "browser" 
>>>>> opened
>>>>> TW).
>>>>>
>>>>> Best regards,
>>>>> Yakov.
>>>>>
>>>>> [1] http://tiddlytools.com/#**Toggle**RightSidebar%**20ToggleLeftSideb
>>>>> **ar <http://tiddlytools.com/#ToggleRightSidebar%20ToggleLeftSidebar>
>>>>>
>>>>> вторник, 16 июля 2013 г., 8:54:26 UTC+4 пользователь Leo Staley
>>>>> написал:
>>>>>
>>>>>> Thank you Eric! I didn't know how to do that from my Android. Firefox
>>>>>> didn't install it when I clicked on it like I thought it should have.
>>>>>>
>>>>>> After downloading it with another browser (because firefox didn't let
>>>>>> me "save link" on long-press) and opening the file using firefox, I was
>>>>>> able to install it.
>>>>>>
>>>>>> Sadly though, no "save" button appears under the tools menu. The
>>>>>> button at the top, to download a copy of the page worked once, but i'm
>>>>>> having trouble doing it again.
>>>>>>
>>>>>> Additionally, when i create a new tiddler, I first have to delete the
>>>>>> existing text in both the title and the main text area, which takes some
>>>>>> time with an android keyboard.
>>>>>>
>>>>>> Eric, How compatible are most of the items on TiddlyTools with
>>>>>> Tiddly5? Is development still continuing with the current edition of
>>>>>> Tiddlywiki, and if so, in what Capacity? Forgive me for being such a 
>>>>>> noob.
>>>>>>
>>>>>> On Monday, July 15, 2013 9:15:47 PM UTC-7, Eric Shulman wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Monday, July 15, 2013 9:13:16 PM UTC-7, Leo Staley wrote:
>>>>>>>>
>>>>>>>> More significantly, There was no way to save any changes I made.
>>>>>>>> Took me a while to realize that.
>>>>>>>>
>>>>>>>>
>>>>>>> As Jeremy noted in his previous post:
>>>>>>>    "... install TiddlyFox to save changes locally on the device (
>>>>>>> https://github.com/TiddlyWiki**/TiddlyFox/raw/master/tiddlyfo**x.xpi<https://github.com/TiddlyWiki/TiddlyFox/raw/master/tiddlyfox.xpi>
>>>>>>> )."
>>>>>>>
>>>>>>> enjoy,
>>>>>>> -e
>>>>>>> Eric Shulman
>>>>>>> TiddlyTools / ELS Design Studios
>>>>>>>
>>>>>>> HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
>>>>>>>    
>>>>>>> http://www.TiddlyTools.com/#D**onations<http://www.TiddlyTools.com/#Donations>
>>>>>>>
>>>>>>> Professional TiddlyWiki Consulting Services...
>>>>>>> Analysis, Design, and Custom Solutions:
>>>>>>>    
>>>>>>> http://www.TiddlyTools.com/#C**ontact<http://www.TiddlyTools.com/#Contact>
>>>>>>>
>>>>>>


-- 
Jeremy Ruston
mailto:[email protected]

-- 
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 http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to