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

scripting2Suite.utilities.convertAddresses

<<Changes
	<<6/11/10; 6:17:39 AM by DW
		<<It's nice to have addresses in the database, but the way Frontier does addresses into guest databases hard-codes file paths into the database. This is not good. So we store the addresses as strings, without the file paths, and convert them to addresses when we need them.
local (adrcal = @scripting2Data.server.users.davewiner.calendar);
on visit (adrstory) {
	on doaddress (adr) {
		local (s = string (adr));
		if s != "" {
			local (ix = string.patternMatch ("\"].", s));
			if ix > 0 {
				s = string.delete (s, 1, ix + 2)}};
		return (s)};
	<<dialog.alert (doaddress (adrstory^.adrnext))
	<<dialog.alert (doaddress (adrstory^.adrprev))
	adrstory^.adrnext = doaddress (adrstory^.adrnext);
	adrstory^.adrprev = doaddress (adrstory^.adrprev);
	return (true)};
mainresponder.calendar.visitReverseChronologic (adrcal, @visit)



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.