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

system.verbs.builtins.radio.utilities.rootUpdate

on rootUpdate (adrInRoot) {
	<<Changes
		<<12/1/01; 7:58:31 PM by DW
			<<Created.
	local (startticks = clock.ticks (), ctNewParts = 0, htmltext, flUpdateOk = true);
	local (databaseName = file.fileFromPath (window.getFile (table.getRootAddress (adrInRoot))));
	try { //do the update, trapping errors so they can be logged
		system.temp.update = rootUpdates.update; //get out of the way if rootUpdates.update is updated
		system.temp.update (adrInRoot, true, @ctNewParts);
		htmltext = ctNewParts + " part";
		if ctNewParts != 1 {
			htmltext = htmltext + "s"};
		htmltext = htmltext + " installed or updated in " + databaseName + "."}
	else {
		htmltext = "Error updating " + databaseName + ": " + tryError;
		flUpdateOk = false};
	if user.radio.prefs.flLogNightlyUpdate {
		radio.log.add ("Nightly update", htmltext, startticks)};
	menu.noSuite ();
	return (flUpdateOk)}



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.