Hi *c pa* and *Vincent*,

Thanks for the replies, both of you. I've got two ideas from all of this, 
and I'd like to run them both by you all, to see which one you think is 
better.

*Option A*

We could copy all the fields from the current tiddler (in our example, it 
would be a specific Person, for instance) and copy them to a temporary 
system tiddler. We then *delete the current tiddler*, so that we don't end 
up with an orphan if the user edits the tiddler title (thereby effectively 
creating a new tiddler). Then we copy the values in the fields from the 
temporary system tiddler into our "Edit Person" tiddler using *<$vars>* 
variables, to basically back up the current state of the Person, in the 
event that the user decides to cancel editing half-way through. The tiddler 
we deleted can then be re-created from the backed-up values. This "Edit 
Person" tiddler contains the *<$edit-text>* widgets and other controls we 
need, and they're linked back to the fields in the same temporary system 
tiddler. When the user is satisfied with their edits, we just create a new 
tiddler based on those fields, exactly as we did from our "Add Person" 
tiddler when the old (now deleted) tiddler was created originally.

*Option B*

Similar to Option A above, except we don't need to delete the existing 
tiddler, because we don't give the user any opportunity to edit the title 
of the tiddler at all. Where currently our tiddler titles are created from 
a combination of the Person's first and last names, we would replace this 
instead with a GUID at creation time, so *all Person tiddlers would have a 
GUID for their tiddler title*. The first and last name fields can then be 
edited freely without it affecting the title of the tiddler, and no orphan 
is produced. We plan to hide the tiddler title and tags anyway, so the 
nasty GUIDs should never be seen by the end-user.

What do you think? Which is the better plan of attack here?

Hegart.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/685f31fe-e610-42db-9c92-4a99013cbdb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to