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

scripting2Suite.server.getAllInstantOutlines

on getAllInstantOutlines (updateStruct=nil) {
	<<Changes
		<<7/26/10; 3:42:37 PM by DW
			<<Add optional parameter, updateStruct. It had one entry for each user that the caller knows about, and the time they last updated as far as they're concerned. We only return outlines for those users who have updated since their last update. 
		<<7/17/10; 1:57:38 PM by DW
			<<Return a table containing all the instant outlines for this workgroup. 
	local (adrsystemdata = scripting2suite.init (), texttable, adruser);
	<<scratchpad.updatestruct = updateStruct
	new (tabletype, @texttable);
	for adruser in @adrsystemdata^.server.users {
		local (adrtext = @adruser^.prefs.instantOutline.opmltext);
		if sizeof (adrtext^) > 0 {
			local (flcopy = true, nameuser = nameof (adruser^));
			if updateStruct != nil { //7/26/10 by DW
				if defined (updateStruct.[nameuser]) {
					if adruser^.prefs.instantOutline.whenLastSave <= updateStruct.[nameuser] {
						flcopy = false}}};
			if flcopy {
				texttable.[nameof (adruser^)] = adrtext^}}};
	return (texttable)};
bundle { //test code
	local (tc = clock.ticks ());
	scratchpad.texttable = getAllInstantOutlines (scratchpad.updatestruct);
	dialog.notify (clock.ticks () - tc)}



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.