> using the <<setUserName>> option provided by SetUserNamePlugin, then
> the UserName does not persist.  I assume that means, it doesn't get
> saved to a cookie.

The relevant code from SetUserNamePlugin is:
-----------------------
var opt="txtUserName";
var who=prompt(this.msg,config.options[opt]);
if (!who||!who.trim().length) return; // cancelled by user
config.options[opt]=who;
saveOptionCookie(opt);
config.macros.option.propagateOption(opt,"value",config.options
[opt],"input");
-----------------------

This code:
* directly saves the username value in config.options["txtUserName"]
* invokes saveOptionCookie() to update the browser's stored cookie
value
* invokes propagateOption() to ensure that the display of any <<option
txtUserName>> fields is properly refreshed.

I just did the following test:
* set username (via sidebar <<option>> field) to "YourName"
* reload document
* verified: sidebar option field now displays "YourName"
* invoke tiddler editor (clicked on 'new tiddler')
* automatically prompted for new username
* entered "TestThis"
* verified: sidebar option field now displays "TestThis"
* verified: new tiddler 'modifier' is assigned "TestThis"
* verified: config.options.txtUserName value is "TestThis"
* verified: document.cookie contains: txtUserName=TestThis;
* reload document
* verified: username is still "TestThis"

So... while I have no doubt that you are experiencing a problem, I
can't reproduce it here, and don't see any obvious flaws in the
existing code either....

hmmm...

-e
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to