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


on initService (url, adrservices) {
		<<12/3/01; 5:41:21 PM by DW
			<<Initialize new fields of a service: ctErrors, ctConsecutiveErrors, timeLastError.
		<<Wednesday, December 27, 2000 at 4:32:01 PM by DW
	local (adrservice = @adrservices^.[url]);
	if not defined (adrservice^) {
		new (tabletype, adrservice)};
	if not defined (adrservice^.ctReads) {
		adrservice^.ctReads = 0};
	if not defined (adrservice^.ctChanges) {
		adrservice^.ctChanges = 0};
	if not defined (adrservice^.timeLastRead) {
		adrservice^.timeLastRead = date (0)};
	if not defined (adrservice^.timeLastChange) {
		adrservice^.timeLastChange = date (0)};
	if not defined (adrservice^.ctErrors) {
		adrservice^.ctErrors = 0};
	if not defined (adrservice^.ctConsecutiveErrors) {
		adrservice^.ctConsecutiveErrors = 0};
	if not defined (adrservice^.timeLastError) {
		adrservice^.timeLastError = date (0)};
	return (adrservice)}
<<bundle //test code
	<<initservice ("", @scratchpad)

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.