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 because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/55d2db4b-3bad-40b6-a66d-ff15235f61a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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.
Resetting it would break the expectation that the changecount for a tiddler can only increase, and never decrease.
What are you trying to accomplish?
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 higher value.
Regards
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/b590c2b8-68c1-4666-bfbc-4b1756c1ba07%40googlegroups.com.
The sync mechanism handles this by keeping track of the last change count it’s seen for each tiddler title.Best wishesJeremy.
| * `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 |
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.changeCountObject
Why there are 10 changes to the Draft of 'HelloThere' ? and that number always increases, but the Draft tiddler does not exists anymore. Then, how can I know which tiddlers exists and which ones does not?
Regards--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/afeaf50b-08e6-4426-b5eb-b2c88996951b%40googlegroups.com.
You’re not supposed to touch that object directly. Information derived from it is passed to change events automatically.Best wishesJeremy
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. Where can I find the daemon that triggers the change events?
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/751ae0f1-811e-41d8-abc4-fb9ad385421f%40googlegroups.com.
Those 10 changes to the draft correspond to the characters you typed.
So if you want to know whether a tiddler exists you’d call store.tiddlerExists(title) in the usual way.
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?
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" those changes, the "sessions" should be reset, and when the user clicks again, then the report will only include the changes made since the last time he checked the report.
Does that make sense
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/41dfa9a5-cecf-4dd2-9848-432db2beede9%40googlegroups.com.
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; you just need to keep track of the last change count you’ve seen for each tiddler you are processing.Best wishesJeremy.