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

system.verbs.builtins.log.scroll

on scroll (item, scrollname="default") {
	<<Changes
		<<8/31/06; 7:17:08 AM by DW
			<<Created. A form of log that shows the last 20 entries that have been added. Useful for watching the flow of addresses for a web server, for example.
	local (adrtable = @user.log.scrolls);
	if not defined (adrtable^) {
		new (tabletype, adrtable)};
	local (adroutline = @adrtable^.[scrollname]);
	if not defined (adroutline^) {
		new (outlinetype, adroutline)};
	local (oldtarget = target.set (adroutline));
	op.setdisplay (false);
	if op.countsummits () > 20 {
		op.firstsummit ();
		op.deleteline ()};
	op.go (down, infinity);
	op.insert (item, down);
	op.setdisplay (true);
	target.set (oldtarget);
	if not window.isopen (adroutline) {
		edit (adroutline)}}
<<bundle //test code
	<<local (i)
	<<for i = 1 to 100
		<<scroll (random (1, 10000))



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.