You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The `wikify` widget, calls newTitle macro, creates a new title using filter transclusion and store it in myTitle variable.
37
+
* The `action-createtiddler` creates a new tiddler using myTitle and myTag.
38
+
39
+
!! Issues and solution
40
+
[[Thomas Elmiger|https://groups.google.com/d/msg/tiddlywiki/3_Xacb7H1p0/KSYPzQguAQAJ]] states that if some tiddlers deleted in this between, the above code may overwrite the previous ones. Assume you have myTiddler-1, myTiddler-2, and myTiddler-3. Now you delete myTiddler-2 abd then create another, the current code sees there is two tiddler, so it creates the next and overwrite myTiddler-3.
41
+
42
+
!!! Solution
43
+
* If myTiddler-2 deleted, the code will create myTiddler-3 1. So there is no risk to overwrite
44
+
* To overcome this issue, the below recursive macro take cares of this issue as below
* The newTiddler macro check if the tiddler is going to created is existed or not. It uses the `list` widget for this purpose.
67
+
* If the tiddler is existed, it calls itself with n icremented by one. This is done by emptyMessage part of `list` widget.
68
+
* The newTiddler macro calls itself as many as time to find a sequence number not in use and then creates the tiddler.
69
+
70
+
!!! Solution iii
71
+
[[Mal|https://groups.google.com/d/msg/tiddlywiki/3_Xacb7H1p0/6LqGKyVmAQAJ]] has proposed using zero padded number. A revised version of zero padded number (assuming 3 digits) is given below.
0 commit comments