Saturday, April 02, 2011 at 9:18 PM.
feedhoseSuite.initHose
on initHose (hosename, flCreate=false) { <<Changes <<2/15/11; 3:44:02 AM by DW <<New optional param, flCreate -- if true, we create the hose table if it doesn't exist. <<9/29/10; 11:49:53 AM by DW <<Created. local (adrdata = feedHoseSuite.init ()); local (adrhose = @adrdata^.server.hoses.[hosename]); if not defined (adrhose^) { if flCreate { //12/7/10 by DW new (tabletype, adrhose)} else { scriptError ("Can't access the hose named \"" + hosename + "\" because it does not exist.")}}; if not defined (adrhose^.condition) { adrhose^.condition = feedhoseSuite.data.virginConditionScript}; if not defined (adrhose^.calendar) { new (tabletype, @adrhose^.calendar)}; bundle { //prefs if not defined (adrhose^.prefs) { new (tabletype, @adrhose^.prefs)}; if not defined (adrhose^.prefs.enabled) { adrhose^.prefs.enabled = false}}; bundle { //stats if not defined (adrhose^.stats) { new (tabletype, @adrhose^.stats)}; if not defined (adrhose^.stats.ctItemsMatchCondition) { adrhose^.stats.ctItemsMatchCondition = 0}}; bundle { //temp table if not defined (system.temp.feedHose.server.waitingThreads.[hosename]) { new (tabletype, @system.temp.feedHose.server.waitingThreads.[hosename])}}; return (adrhose)}; bundle { //test code initHose ("nyTimes", true)}
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.