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

system.verbs.apps.Manila.windowTypes.dialogs.getPassword

on getPassword (adrinfo, adrUsername, adrPassword) {
	<<Cross-platform script for running a username/password dialog.
		<<Wed, Aug 23, 2000 at 3:37:16 PM by PBS
	<<Changes:
		<<Change default username to the one stored in the site prefs table, instead of the empty string.
	
	local (t); new (tableType, @t);
	t.flSavePassword = adrinfo^.flSavePassword;
	t.password = "";
	t.username = adrUsername^;
	
	if system.environment.isMac {
		card.run (@manila.windowTypes.dialogs.cards.passwordDialog)}
	else {
		if not defined (system.temp.htmlDialog) {
			new (tableType, @system.temp.htmlDialog)};
		local (adrTempTable = @system.temp.htmlDialog.[this]);
		adrTempTable^ = t;
		html.dialog.run (@manila.windowTypes.dialogs.wizard, 1, adrTempTable);
		t = adrTempTable^;
		delete (adrTempTable)};
	
	if not defined (t.userClickedOk) {
		return (false)};
	
	if (t.username == "") or (t.password == "") {
		return (false)};
	
	adrUserName^ = t.username;
	adrPassword^ = t.password;
	adrinfo^.flSavePassword = t.flSavePassword;
	
	return (true)};

bundle { //debugging
	local (username = "Jake", password = "blah");
	getPassword (@user.manila.data.sites.["http://private.braincase.net:80/"], @username, @password);
	dialog.notify (username + " " + password)}



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.