Saturday, April 02, 2011 at 9:18 PM.

feedhoseSuite.client.initHose

on initHose (hosename) {
	<<Changes
		<<9/29/10; 2:22:19 PM by DW
			<<Client-side hose init.
	local (adrdata = feedhosesuite.init ());
	local (adrhose = @adrdata^.client.hoses.[hosename]);
	if not defined (adrhose^) {
		new (tabletype, adrhose)};
	if not defined (adrhose^.calendar) {
		new (tabletype, @adrhose^.calendar)};
	if not defined (adrhose^.outline) { //2/12/11 by DW
		new (outlinetype, @adrhose^.outline)};
	bundle { //prefs
		if not defined (adrhose^.prefs) {
			new (tabletype, @adrhose^.prefs)};
		if not defined (adrhose^.prefs.enabled) {
			adrhose^.prefs.enabled = false};
		if not defined (adrhose^.prefs.server) {
			adrhose^.prefs.server = "hose.scripting.com"};
		if not defined (adrhose^.prefs.serverHoseName) {
			adrhose^.prefs.serverHoseName = hosename};
		if not defined (adrhose^.prefs.fHtml) {
			adrhose^.prefs.fHtml = ""};
		if not defined (adrhose^.prefs.title) {
			adrhose^.prefs.title = ""}};
	bundle { //stats
		if not defined (adrhose^.stats) {
			new (tabletype, @adrhose^.stats)};
		if not defined (adrhose^.stats.lastSeed) {
			adrhose^.stats.lastSeed = ""};
		if not defined (adrhose^.stats.ctLaunches) {
			adrhose^.stats.ctLaunches = 0};
		if not defined (adrhose^.stats.ctLoops) {
			adrhose^.stats.ctLoops = 0};
		if not defined (adrhose^.stats.ctNewItems) {
			adrhose^.stats.ctNewItems = 0};
		if not defined (adrhose^.stats.ctTimeouts) {
			adrhose^.stats.ctTimeouts = 0};
		if not defined (adrhose^.stats.ctWrites) {
			adrhose^.stats.ctWrites = 0};
		if not defined (adrhose^.stats.flWrite) {
			adrhose^.stats.flWrite = false}};
	bundle { //temp
		if not defined (system.temp.feedHose.client.threadIDs) {
			new (tabletype, @system.temp.feedHose.client.threadIDs)}};
	return (adrhose)};
bundle { //test code
	initHose ("hackerNews")}



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.