Interesting.  I also have the CookieJar plugin installed, though I
don't know if that makes a difference or not.  I don't have a cookie
set for txtUserName as one of the baked cookies since we use the TW
files in a multiuser environment.  Despite the fact you are unable to
reproduce the problem, at least now that I know what's causing the
problem, I can come up with a suitable workaround.  Thanks for the
quick feedback!

On May 18, 12:57 pm, Eric Shulman <[email protected]> wrote:
> > 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