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

scripting2Suite.editor.io.initUser

on initUser (username) {
	<<Changes
		<<7/15/10; 10:52:05 AM by DW
			<<Created. 
	local (adrdata = scripting2suite.init ());
	local (adruser = @adrdata^.editor.buddies.users.[username]);
	if not defined (adruser^) {
		new (tabletype, adruser)};
	bundle { //stats
		if not defined (adruser^.stats) {
			new (tabletype, @adruser^.stats)};
		if not defined (adruser^.stats.flDirty) {
			adruser^.stats.flDirty = true};
		if not defined (adruser^.stats.ctUpdates) {
			adruser^.stats.ctUpdates = 0};
		if not defined (adruser^.stats.whenLastUpdate) {
			adruser^.stats.whenLastUpdate = date (0)};
		if not defined (adruser^.stats.whenCreated) {
			adruser^.stats.whenCreated = clock.now ()};
		if not defined (adrUser^.stats.ctTicksOutlineCompile) {
			adrUser^.stats.ctTicksOutlineCompile = 0}};
	return (adruser)};
bundle { //test code
	initUser ("davewiner")}



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.