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


on ask (prompt, adr) {
	local (userhitok = false);
	on itemhit (item) {
		case item {
			-1 {
				dialog.setvalue (3, prompt);
				if defined (adr^) {
					dialog.setvalue (4, adr^)};
				return (true)};
			1 {
				userhitok = true;
				adr^ = dialog.getvalue (4);
				return (false)};
			2 {
				userhitok = false;
				return (false)}}
		else {
			return (true)}}; <<keep going if item isn't OK or Cancel (262, 1, @itemhit);
	return (userhitok)}

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.