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

scripting2Suite.data.code.realtime.server.init

on init (adrdata) {
	<<Changes
		<<7/19/10; 9:10:45 AM by DW
			<<Created. 
	if not defined (adrdata^.server) {
		new (tabletype, @adrdata^.server)};
	bundle { //prefs
		if not defined (adrdata^.server.prefs) {
			new (tabletype, @adrdata^.server.prefs)};
		if not defined (adrdata^.server.prefs.enabled) {
			adrdata^.server.prefs.enabled = false};
		if not defined (adrdata^.server.prefs.ctSecsTimeout) {
			adrdata^.server.prefs.ctSecsTimeout = 180}};
	bundle { //stats
		if not defined (adrdata^.server.stats) {
			new (tabletype, @adrdata^.server.stats)};
		if not defined (adrdata^.server.stats.ctMessages) {
			adrdata^.server.stats.ctMessages = 0};
		if not defined (adrdata^.server.stats.ctErrors) {
			adrdata^.server.stats.ctErrors = 0}};
	bundle { //callbacks
		if not defined (adrdata^.server.callbacks) {
			new (tabletype, @adrdata^.server.callbacks)};
		if not defined (adrdata^.server.callbacks.validatePassword) {
			new (tabletype, @adrdata^.server.callbacks.validatePassword)}};
	if not defined (adrdata^.server.users) {
		new (tabletype, @adrdata^.server.users)};
	bundle { //install RPC handlers
		if not defined (user.betty.rpcHandlers.realtime) {
			user.betty.rpcHandlers.realtime = @realtime.server.rpcHandlers}}};
bundle { //test code
	init (@realtimeData)}



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.