>
> So, at startup, and each time the user clicks the button, you’d scan the
> changecounts of all the tiddlers in the store, and compare against the
> record you kept from the last check. The difference tells you which
> tiddlers have changed. You don’t need to change anything in the store;
Hi Danielo
> I want to allow the user make all the changes he/she wants to the wiki. Then,
> when he cliks one button, I want to generate a report with the tiddlers that
> have been changed for the running sesion. Creation, deletion and update. At
> that point, if the user decides to "save"
Hello Jeremy
El domingo, 4 de octubre de 2015, 17:37:08 (UTC+2), Jeremy Ruston escribió:
> The wiki store keeps track of a changecount for each tiddler title. It is
> used by the sync object to track changes to the store, amongst other things.
>
That is exactly the functionality that I
Hi Danielo
> Basically I want to know which tiddlers has changes since the last time I
> extracted the changed tiddlers and saved in a remote place. I think I can
> just copy the object each time I want to "commit" and compare it with the
> previous values, and get only those that have an
According to wiki.js code:
* `changedTiddlers` is a hashmap describing changes to named tiddlers since
wiki change events were last dispatched. Each entry is a hashmap containing
two fields: modified: true/false deleted: true/false
But the changedTiddlers object is always empty.
--
You
> The sync mechanism handles this by keeping track of the last change count
> it’s seen for each tiddler title.
>
> Best wishes
>
> Jeremy.
>
Hello Jeremy,
Thank you, that is what I'm going to do. Which part of the sync mechanism
tracks this? I suppose it is not any sync adapter, it is
Hi Danielo
> So far so good. Then, if I change the Hello there tiddler (edit -> add
> content -> save) the count increases on a weird way:
>
> $tw.wiki.changeCount
> Object
> $:/HistoryList: 3
> $:/StoryList: 3
> $:/state/popup/more--1211625487: 2
> $:/state/popup/tiddler-info--1779055697: 2
>
>
> I’m not sure what you mean. When a change is registered in the store, we
> queue an event an dispatch it via nextTick().
>
> Perhaps you can explain a little about what you are trying to accomplish?
>
It is quite easy, let me explain it well.
I want to allow the user make all the changes
Hi Danielo
> The change events format is exactly what I was looking for. The only problem
> is that they are events, and I want to extract the information on user
> interaction. I think the best way is to mimic the behavior of the change
> daemon, but I would like to avoid duplicating stuff.
>
> You’re not supposed to touch that object directly. Information derived
> from it is passed to change events automatically.
>
> Best wishes
>
> Jeremy
>
The change events format is exactly what I was looking for. The only
problem is that they are events, and I want to extract the
>
> Those 10 changes to the draft correspond to the characters you typed.
>
I think is actually 8 + 1 when entering in edit mode and +1 when clicking
save
> So if you want to know whether a tiddler exists you’d call
> store.tiddlerExists(title) in the usual way.
>
That would be
Hi Danielo
> I think I can remember a function that returns the tiddlers that have changed
> since the wiki has loaded.
>
> I can see a wiki.changeCount object. Is that the intended way knowing it? Is
> there any side effect if I manually empty that object?
The wiki store keeps track of a
Hello,
I think I can remember a function that returns the tiddlers that have
changed since the wiki has loaded.
I can see a wiki.changeCount object. Is that the intended way knowing it?
Is there any side effect if I manually empty that object?
Thanks in advance.
--
You received this message
13 matches
Mail list logo