About the Critique COM Component
The Critique Client Side COM Component supports the functionality users access through the Choose Title dialog box, which lets a user associate a new critique with a title in the FmLib database.
In the Critique ActiveX DLL, the main entry point is a public ChooseTitle class, which exposes one interface, the Critique interface. This interface in turn includes one method, called ChooseTitle. Either of the following user actions can invoke the ChooseTitle method:
Method |
Description |
ChooseTitle |
Searches for library titles, displays them, and processes a user's choice of a title. |
About the ChooseTitle Method
The ChooseTitle method executes or controls all the following actions, described from a user's perspective in Using the Find Library Title Dialog Box:
- It displays the Choose Title dialog box.
- The Choose Title dialog box accepts from the user any of the following: item title, authors, and media type.
- The FmLib database is searched, using the input title, authors, and media type as parameters. This search returns a recordset but its contents are copied into a collection object and the recordset is discarded.
- The application uses the client-side collection object to display the resulting matches on the extended Choose Title dialog box. See About the FoundTitle Object.
- Users can click one from among multiple matches to select a unique title to critique.
- The title, authors, and media type of the match clicked in step 5 are copied onto the critique form.
The ChooseTitle method requires the following ByRef parameters: MediaType, Title, Authors, and bib#. (Although ByRef is the default way to pass parameters, it is good to specify ByRef explicitly.) After the user specifies these parameters in a search string and clicks Find Now, ChooseTitle passes the entered search string from the form, along with two items not entered by the user:
- The user's logon name (e-mail alias) is required because the application needs to know what items have already been reviewed by that person. This user identity is read from a field on the message, using the Outlook Object Model. (For comparison, in the original CML application, the client-side UserInfo COM component was used to retrieve user identity.)
- The name of the server on which to find the sought title information. Athough this information resides in the FmLib SQL Server database, the computer that must be specified here is the Web server that hosts ActiveX Data Objects (ADO). The server name is also read from a message property that was written into a hidden field on the message.
The method returns values for these four parameters, all of which (except bib#) are displayed in the dialog box and later are copied onto the critique form as properties.