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

system.verbs.builtins.tcp.setOffline

on setOffline (flOffline) {
	<<Changes
		<<10/16/01; 7:49:05 PM by JES
			<<Call the callback scripts when we just went online, or when we're about to go offline. Now the callbacks can make an RPC request when switching to either state, not just in the case where we're about to go offline.
		<<10/16/01; 12:45:33 PM by DW
			<<Allow for callbacks.
		<<09/22/00; 11:25:18 AM by PBS
			<<Created. Set the offline flag. If flOffline is true, the user is working offline.
	
	if not tcp.isOffline () { //call the callbacks
		system.callbacks.tcpSetOffline (flOffline)};
	
	if system.environment.isWindows { //set HTML control offline status
		if not (date.versionLessThan (Frontier.version (), "7.0b25")) { //7.0b25 or greater
			return (htmlControl.setOffline (flOffline))}};
	
	user.prefs.tcpIsOffline = flOffline;
	
	if not tcp.isOffline () { //call the callbacks
		system.callbacks.tcpSetOffline (flOffline)}; //call the callbacks
	
	return (true)}
<<bundle //test code
	<<setOffline (false)



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.