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

scripting2Suite.data.code.realtime.init

on init () {
	<<Changes
		<<7/11/10; 8:53:54 AM by DW
			<<Created. 
	local (adrdata);
	bundle { //temp table
		if not defined (system.temp.realtime) {
			new (tabletype, @system.temp.realtime)};
		if not defined (system.temp.realtime.client) {
			new (tabletype, @system.temp.realtime.client)};
		if not defined (system.temp.realtime.server) {
			new (tabletype, @system.temp.realtime.server)};
		if not defined (system.temp.realtime.stats) {
			new (tabletype, @system.temp.realtime.stats)};
		if not defined (system.temp.realtime.stats.flDataFileOpen) {
			system.temp.realtime.stats.flDataFileOpen = false}};
	bundle { //set adrdata
		local (flcheck = not system.temp.realtime.stats.flDataFileOpen);
		adrdata = frontier.opendatafile ("realtimeData", flCheckWindowOpen:flcheck);
		system.temp.realtime.stats.flDataFileOpen = true};
	bundle { //prefs
		if not defined (adrdata^.prefs) {
			new (tabletype, @adrdata^.prefs)}};
	bundle { //stats
		if not defined (adrdata^.stats) {
			new (tabletype, @adrdata^.stats)};
		if not defined (adrdata^.stats.ctInits) {
			adrdata^.stats.ctInits = 0};
		adrdata^.stats.ctInits++};
	realtime.server.init (adrdata);
	realtime.client.init (adrdata);
	return (adrdata)};
bundle { //test code
	init ()}



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.