ProfileToolDocumentation:[Phylum]ProfileTool.PressProgram:{Phylum}ProfileTool.DcomRevised:July 18, 1983 by Martin YonkeGeneral commentsThe ProfileTool is used to create a graphical user interface to attributes of any "package"written in Interlisp. It accomplishes this by creating a specialized InspectorWindow forenumerating and changing variables, etc. of a package as described to the ProfileTool. [Itassumes the user is familiar with the use of InspectorWindows.]UseA ProfileTool is created by calling the function PROFILETOOL with ProfileKeys and a title forthe InspectorWindow. ProfileKeys is a list of instances of the record PROFILEKEY. APROFILEKEY record has the following fields: DESCRIPTOR, FETCHFN, REPLACEFN,HELPSTRING, and EXTRADATA.DESCRIPTOR is usually an atom (although it can be a string) which getsprinted as the "property name" in the InspectorWindow.FETCHFN is a function to be envoked to determine the "value" of theDESCRIPTOR. If FETCHFN is a litatom, then it will be applied (APPLY*)to the DESCRIPTOR and PROFILEKEYS. If FETCHFN is NIL, then(GETTOPVAL DESCRIPTOR) will be used.REPLACEFN is a function to be envoked to "set" the value of theDESCRIPTOR. If REPLACEFN is a litatom, then it will be applied toDESCRIPTOR and PROFILEKEYS (unless it is the atom DON'T, in whichcase there is no REPLACEFN). It should determine a value, usually byasking the user, and return the new value. If REPLACEFN is a list oflitatoms, then that list will be taken as the list of all possible values forthe DESCRIPTOR, a pop-up menu will be created of those items, and aSETTOPVAL will be envoked on the DESCRIPTOR and the value returnedfrom MENU. If REPLACEFN is NIL, then the behavior will be as ifREPLACEFN was (T NIL)  i.e. the only possible values of DESCRIPTORare T or NIL. Whenever REPLACEFN is used, the new value will beredisplayed in the ProfileTool window, expanding it's width if necessary."a'p \q $ [# YF Sr Ost s. MFts KaIqu I->q Cr ?s1v st sts =2v s ;ev s v 90 svs5Uv s3 6/Dvs .-v svs v*sv sv svsvs(vs $vs/"v svs  bv sv svs.vsvs)/vs 5v s-\vsv s(vsv svs!v svs$v svsvs vs 0 C=V)ProfileTool2HELPSTRING is a string to be printed out in the PROMPTWINDOW undercertain conditions. [Currently, HELPSTRING is not used since the conditions havenot yet been determined, but is planned to be used in the future.]EXTRADATA is a place holder for any "package information" associatedwith the DESCRIPTOR. Since PROFILEKEYS are passed to FETCHFNand REPLACEFN, a user of ProlfileTool can use this as he pleases (e.g.to cache information). Some ExamplesIf a package has a global variable that should only have the values T or NIL, then the keyin PROFILEKEYS can be just the value of (create PROFILEKEY DESCRIPTOR _ 'var).If a package has a global variable that should only have the values FOO, FUM, or FIE,then the key should be the value of(create PROFILEKEYDESCRITOR _ 'varREPLACEFN _ '(FOO FUM FIE)).If a package wants to display a read-only item, e.g. the user's name, then the key should bethe value of(create PROFILEKEYDESCRIPTOR _ 'UserNameFETCHFN _ (FUNCTION GETUSERNAME)REPLACEFN _ 'DON'T)where GETUSERNAME is defined to be (LAMBDA (D K) (USERNAME NIL T)).Of course, the FETCHFN and REPLACEFN can be as complex as necessary. ProfileTool hasbeen designed to give maximum flexiblity, but simplifying the most typical cases  i.e. globalvariables with a fixed set of possible values. %f@r Ffbv sv s_qu;]AqYvs6Wv svUp s .S< O` Ir DZsDvsvs t B%sv svwvxvs <3vsv :ns#289vwv x6vs 0= .M 2,vwv   )' %|sv svs vsvs1 A . X 8=HR HELVETICA HELVETICA HELVETICA  HELVETICA  HELVETICA  HELVETICAGACHA GACHA GACHA ' j/  C gprofiletool.bravoYonkeJuly 18, 1983 3:21 PM