Monday, November 08, 2010 at 12:05 AM.

system.verbs.builtins.radio.userInterface.passwordPopup

on passwordPopup (default=nil) {
	<<8/3/01; 6:08:25 PM by JES
		<<Render the HTML for a popup menu form element, to choose a password among the passwords at user.radio.prefs.passwords.
	local (htmltext = "", indentlevel = 0);
	on add (s) {
		htmltext = htmltext + string.filledString ("\t", indentlevel) + s + "\r"};
	
	if default == nil { //default to the first password in user.radio.prefs.passwords
		default = nameOf (user.radio.prefs.passwords[1])};
	
	add ("<select name=\"passwordName\">");
	local (adrpassword);
	for adrpassword in @user.radio.prefs.passwords {
		local (name = nameOf (adrpassword^), selectedtext = "");
		if string.lower (name) == string.lower (default) {
			selectedtext = " selected"};
		add ("<option value=\"" + name + "\"" + selectedtext + ">" + name + "</option>")};
	add ("</select>");
	
	return (htmltext)}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.