Sunday, March 06, 2011 at 12:00 PM.


on init () {
		<<3/6/11; 11:47:41 AM by DW
			<<The recentChanges outline becomes a table.
		<<3/2/11; 6:45:05 PM by DW
			<<Init user.webEdit.stats.
	if not defined (user.webEdit) {
		new (tableType, @user.webEdit)};
	if not defined (user.webEdit.servers) {
		new (tableType, @user.webEdit.servers)};
	bundle { //prefs
		if not (defined (user.webEdit.prefs)) {
			new (tableType, @user.webEdit.prefs)};
		if not (defined (user.webEdit.prefs.currentServer)) {
			user.webEdit.prefs.currentServer = ""};
		if not (defined (user.webEdit.prefs.overrideWebEditServerDirective)) {
			user.webEdit.prefs.overrideWebEditServerDirective = false};
		if not (defined (user.webEdit.prefs.flDialogs)) {
			user.webEdit.prefs.flDialogs = true};
		if not (defined (user.webEdit.prefs.flKeepRecentChangesOutline)) { //3/3/11 by DW
			user.webEdit.prefs.flKeepRecentChangesOutline = false}};
	bundle { //stats
		if not defined (user.webEdit.stats) {
			new (tableType, @user.webEdit.stats)};
		<<if not defined (user.webEdit.stats.recentChanges)
			<<new (outlinetype, @user.webEdit.stats.recentChanges)
		bundle { //user.webEdit.stats.recentChanges
			if defined (user.webEdit.stats.recentChanges) {
				if typeof (user.webEdit.stats.recentChanges) == outlinetype {
					table.rename (@user.webEdit.stats.recentChanges, "recentChangesOutline");
					new (tabletype, @user.webEdit.stats.recentChanges)}}
			else {
				new (tabletype, @user.webEdit.stats.recentChanges)}}};
	webEdit.buildServerSubMenu ();
	return (true)};
bundle { //test code
	local (startticks = clock.ticks ());
	init ();
	dialog.alert (clock.ticks () - startticks)}

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.