Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version


Arguments: cg-configuration

Returns a value that identifies the particular instance of the default HTML browser program that is currently being used by the function invoke-private-html-browser to show HTML pages from lisp. cg-configuration should be a configuration object such as returned by configuration (typically (configuration *system*)).

The IDE saves this value in its file at exit time so that it can reuse the same browser instance in the next IDE session, if that browser instance still exists. Otherwise each IDE session would create a new instance of the browser, which could result in multiple leftover browsers cluttering the environment.

A standalone application that calls invoke-private-html-browser to display HTML files could use this value in a similar way. Here are the necessary steps:

  1. When the application is about to exit, it should evaluate the expression (private-html-browser-handle (configuration *system*)). If the returned value is non-nil, the application should then save the value somewhere (typically in a file) where it can retrieve it later.
  2. When the application starts up, it should look for the saved value. If one is found, the application should evaluate the expression (setf (private-html-browser-handle (configuration *system*)) the-value) to restore the value to the application. (The symbol the-value in that expression represents the retrieved value.)

Any subsequent calls to invoke-private-html-browser will then reuse the same browser instance as the previous session of the application, if that browser instance still exists. (Otherwise a new browser instance will be created as usual.)

The form of the cached value is not really important since you should always restore the original value without modifying it. But in fact the value is a list of three members: (1) a keyword indicating which browser program was used, such as :firefox, :chrome, :explorer, :mozilla, :netscape6, or :netscape4 (other keywords may be added); (2) the handle of the browser's main window (an integer); and (3) t if this browser instance has been used only once, and nil otherwise. So basic Lisp printing and reading is sufficient to store the value to a file and to retrieve it.

Copyright (c) 1998-2017, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2017.2.15.

Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version