ENHANCED ELECTRONIC MAIL SYSTEM INCLUDING METHODS AND APPARATUS FOR IDENTIFYING MIME TYPES AND FOR DISPLAYING DIFFERENT ICONS

Abstract: Electronic mail client software (16) has a mailbox displayer (14) which lists messages together with an icon for each message where the icon is associated with the MIME type of the message. Mail which contains file attachment (18) is listed in the inbox with an icon indicative of the type of file attached to the mail. The mailbox displayer interprets the MIME type and selects the appropriate icon either from the icon registry in the OS or from a directory of icons maintained by the email client software. If there is no appropriate icon in the directory of icons, the mailbox displayer uses icon image data contained in a subpart of the MIME message if it is available. Otherwise, no icon or a generic icon is used. According to the presently preferred embodiment, a type table (20) is maintained by a type updater (12) component. The type includes a list of message types and subtypes together with filenames of scalable icons to be used by the mailbox displayer.

Description: ENHANCED ELECTRONIC MAIL SYSTEM INCLUDING METHODS AND APPARATUS FOR IDENTIFYING MIME TYPES AND FOR DISPLAYING DIFFERENT ICONS This application is a continuation-in-part of application serial number 09/209,162 filed December 10, 1998, the complete disclosure of which is hereby incorporated by reference herein. This application is related to copending application serial number [BAK-007] filed simultaneously herewith, the complete disclosure of which is also hereby incorporated by reference herein. BACKGROUND OF THE INVENTION 1. Field of the Invention The invention relates to an electronic mail program. More particularly, the invention relates to an electronic mail program having a mailbox browser display which displays different icons for different types of mail item MIME types. 2. State of the Art In recent years electronic mail ("email") has become widely used in business, education, and in personal communications. One of the features of electronic mail which is most convenient, particularly in business and in education, is the ability to attach a binary computer file to an email message. This feature enables email correspondents to rapidly share word processing documents, database documents, spreadsheet documents, multimedia documents, or virtually any kind of binary file created by a computer. There are, however, some serious limitations and inconveniences associated with attaching a binary file to an email message. The original Internet mail system as defined in 1982 with RFC (Request for Comments) 821 and 822 had a number of important limitations. In particular, the system was not designed to carry large quantities of arbitrary data in an email message. In fact, the 1982 SMTP (Simple Mail Transport Protocol) standard required that an email message consist of a single message containing only ASCII characters in lines of 1000 characters (blocks of 32k) or less. The ability to send binary data through the Internet electronic mail system was made possible with the MIME (Multipurpose Internet Mail Extensions) standard for Internet messages. The original MIME standard was published as an Internet Request For Comments document (RFC 1341) and approved in June of 1992. (See Internet RFCs 2045,2046, and 2047 for the latest MEVIE standards documents.) The MIME standard describes how an email message should be formatted in order to be considered MIME compliant. MIME defines a set of message header fields and a set of message encoding standards that are designed to overcome the limitations of RFC 822 message formats and still be transportable through any of the numerous legacy mail transport systems in use on the Internet. (See specifically, N. Freed and N. Borenstein, Multipurpose Internet Mail Extensions (MIME) Part 1: Format of Message Bodies. Network Working Group, Request For Comments (RFC 2045) November 1996.) MIME message header fields extend those defined in RFC 822 and describe the content and encoding type of the email message. Encoding schemes allowed in the MIME standard include "quoted-printable", and "base64". In addition, three unencoded data types are allowed. These are labeled "8bit", "7bit", or "binary". It should be noted that legacy gateways still do not handle binary data and nearly all MIME compliant messages encode binary data as "7bit", the default encoding for MIME. Today MEVIE is implemented in all of the major electronic mail clients or "User Agents", e.g. Microsoft Outlook and Outlook Express, Netscape Communicator, and Qualcomm Eudora. However, only a few MIME types including "text/plain", "text/html", "multipart/alternative", and "multipart mixed" can be handled by these programs. Probably the most important feature of the MIME standard that was that it allowed any binary data to be appropriately encoded and sent through the older SMTP system of mail gateways and exchanges. Mail client programs such as those listed above were modified to allow users to attach any type of file to a mail message. This was done by (a) including an appropriate encoding module to translate the binary data of an arbitrary file to an acceptable MIME encoding such as "7bit" or "base64", (b) expanding the Mail client's ability to handle messages with a MIME type set to "multipart", and (c) including the file specified by a user as a part of the "multipart" message. For many years, mail client programs offered users only the two choices; they could send a simple text message (sent with "content-type = text/plain") or they could attach any file to a simple text message (sent with "content-type = multipart/mixed"). More recently the programs listed above have been extended to allow authors to use basic types of text formatting such as alternative fonts and styles by including these features in the mail client text editor and sending the message with a MIME type set to "text/html". Today Microsoft's Outlook even allows a person to use Word, a full featured text editor, to author electronic mail messages by converting the Word file format to HTML before manually inserting it into the body of the mail message for sending. Nevertheless, mail client programs still rely exclusively on file attachments with message MEVIE types set to "multipart" for any other type of file format. • If the sender and the receiver of the email message with the attached binary file are using the same brand and version of email program and both programs are configured in substantially the same way, the receiver's email program should automatically apply the appropriate decoding to the attached binary file and produce a file which is identical to the file which was attached to the email by the sender. However, if the sender and receiver are using different email programs, the recipient may receive a file which must be decoded by the recipient using a separate decoding program. Even after the file is properly received and decoded, it is often difficult for the receiver of the file to open the file. The receiver of the file might expect that "clicking" on the file icon will open the file. However, clicking on the file icon will often not open the file. It may result in an error message like "application not found" or, worse, it may result in the file being opened by an inappropriate apphcation thereby displaying "gibberish". The receiver of the file must have a program capable of reading (opening) the file. For example, if one attaches a spreadsheet file to an email message, the receiver of the file must have a spreadsheet program in order to open the file. Technically, it is not necessary that the receiver of the file have the same brand program as that which created the file. However, opening a file with a program which did not create it, though possible, can be very inconvenient. The receiver of the file must know what kind of file is attached to the email message, must know what program on their computer is capable of reading that type of file, must launch the program, must open the file from within the program, and wait while the program translates the file. The limitations of Internet electronic mail can become even more frustrating if the sender and recipient are not using the same operating system (OS). Some mail attachment encoding schemes (and file compression schemes) are OS-dependent and it is possible that an email recipient could receive a file which is impossible to decode (or decompress). These limitations in electronic mail have discouraged many people, particularly non- sophisticated computer users, from attaching files to electronic mail messages. In fact, for some novice users, the task of launching one application to create a document, saving the document, launching a separate email application to create an email message, and then locating the saved document for attachment to an email message is daunting enough to discourage them. In addition, novice users often complain that after "downloading" a file attached to an email message they cannot find the file on their hard disk. Most email client software allows the user to sort items in the inbox by sender, subject, or date in order to locate more easily a particular mail item. In addition, most email client software indicates whether a particular message includes an attached file. This is indicated by an icon such as a paper clip icon or a generic document icon or a floppy disk icon, for example. However, the same icon is used regardless of the nature of the attachment and there is no way of knowing the nature of the attachment until the message is opened. Prior art Figure 1 shows an example of a typical email inbox where some of the mail items have attached files indicated by the paper clip icon to the left of the subject name. Though not specifically shown in Figure 1, those skilled in the art will appreciate that generic icons, such as !, a, A , 4, etc., may also be displayed alongside the message subject to indicate various "properties" of the message, such as whether it is a high priority message, whether you have already replied to the message, etc. These generic icons are usually monochromatic font characters taken from a "dingbats" font or the like. In the most recent versions of the major email client programs, an icon that represents the file type of an attached file is displayed in the body of the mail message after the message is opened by the user. This is possible because computer operating systems such as Microsoft Windows or Macintosh OS maintain data that associates information with each file type known to the system. This information includes a graphical icon and the location of programs that may be used to "open", "edit", or to perform a handful of other actions on the file. For example, in Microsoft Windows the system registry includes entries for each file type that is known to the system and at least some of the information described above is associated with the file type. When a user opens an electronic mail message with "content-type = multipart/mixed", a mail client program built for Microsoft Windows (e.g. Microsoft Outlook) determines that the second part of the message was an attached file, identifies a line of text within the message such as, Attachment Converted: "c:\attach\aFile.doc", looks in the system registry for the icon associated with the file type ".doc", and displays the graphical icon inside the body of the message. In current systems, MIME type is not used to associate icons to files, rather the file type extension is used. This creates important limitations in the ability to associate different versions of software or documents created by different versions of the software with different icons. For example all documents created by MS Word, regardless of which version of Word was used, have the same file type (file extension) and as a result are associated with the same icon. This is true even though many newer versions of the files cannot be read by older versions of the software. My previously incorporated parent application discloses electronic mail software which includes a main email component and a number of installable components. The installable components include authoring/reading components for creating/reading different kinds of documents and mailbox components for listing different kinds of messages or for listing messages in different styles. The main email component provides an underlying graphical user interface for functions directly associated with the storage and transfer of electronic mail messages, and also handles all data bundling and unbundling required to transform a message created by an authoring component into a MEVIE compliant message. The authoring/reading components act like apphcations embedded within the email program and allow specific types of documents such as spreadsheets, graphics, databases, etc. to be created from within the email program and emailed directly. The authoring/reading components also allow received documents to be read without the difficulties traditionally associated with attaching binary files to an email letter. The authoring components of the invention pass data to the main email component which packages the data as a MEVIE compliant message. When the message is received, the main email component concatenates (as needed) and decodes the MEVIE message and sends the data to the authoring/reading component associated with the MEVIE type. My previously incorporated parent application broadly disclosed and claimed mailbox handling software whereby messages of different types are displayed in different ways in a mailbox listing within the context of the modular component email software. It is believed that certain features disclosed in my parent application are applicable to any email client software and may be used to improve the process of attaching files to email and using files attached to email. SUMMARY OF THE INVENTION It is therefore an object of the invention to provide an electronic mail program which includes an inbox list whereby different kinds of messages and attached documents are displayed with different kinds of icons. In accord with this object which will be discussed in detail below, electronic mail client software according to the invention has a mailbox displayer which lists messages together with an icon for each message where the icon is associated with the MEVIE type of the message. Mail which contains a file attachment is listed in the inbox with an icon indicative of the type of file attached to the email. The mailbox displayer interprets the MEVLE type and selects the appropriate icon either from the icon registry in the OS or from a directory of icons maintained by the email client software. For example, if an email with an ADOBE ACROBAT file attachment is received, the ADOBE ACROBAT icon will appear in the mailbox hsting alongside the mail item listing. In addition, if a message is created with a special authoring/reading component as described in my parent application, the icon associated with the authoring/reading component will be displayed in the mailbox listing as part of the line displaying the mail item. The electronic mail software of the present invention is described by example with reference to the email software of my parent application which includes a main email component and a number of installable components which communicate bidirectionally with the email component through an application programming interface (API). The installable components include authoring/reading components as well as a mailbox displayer component. According to the presently preferred embodiment, a component is also included for maintaining a database of icons. The mailbox displayer component functionality is invoked by the user when the mailbox is opened, when the list of mail is scrolled, etc. The mailbox displayer component preferably includes all of the functionality of state-of-the-art mailbox displayers and includes the functionality of looking to a directory of icons for display with information about the message based on the MIME type of the message. In the Lingo embodiment, a data structure is created for each message with an additional TYPE field that is based on the MEVIE type and subtype of the message. The internal TYPE field is used to associate MEVIE types to icons. Another embodiment uses the contents of "content-type" (MEVTE type) header of the message directly to associate with icon images. If there is no appropriate icon in the directory of icons, the mailbox displayer uses icon image data contained in a subpart of the MEvffi message if it is available. Otherwise, no icon or a generic icon is used. According to the presently preferred embodiment, a type table is maintained by a type updater component. The type table includes a list of message types and subtypes together with filenames of scalable icons to be used by the mailbox displayer. The invention prefers scalable icons so that the icon can be sized to accompany the font size chosen to display the mailbox contents. Several embodiments of the type updater component are provided. According to the first embodiment, icons are installed/removed manually by the user. According to a second embodiment, icons are automatically installed/removed when modular authoring/reading components are installed/removed. According to a third embodiment, new icons are added automatically whenever a new message type is encountered by the mailbox displayer. The new icon is retrieved from either the operating system registry or from the icon image data embedded in the message. According to a fourth embodiment, the type updater automatically queries a network server for new icon information and downloads icon image data as needed. Additional objects and advantages of the invention will become apparent to those skilled in the art upon reference to the detailed description taken in conjunction with the provided figures. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a screen shot of a prior art electronic mailbox displayer; Figure 2 is a screen shot of an electronic mailbox displayer according to the invention; Figure 2a is a screen shot of an electronic mailbox displayer according to an alternate embodiment of the invention; Figure 3 is a block diagram of the component organization of an electronic mail client according to the invention; Figure 4 is a simplified flow chart illustrating the basic operation of a mailbox displayer according to the invention; Figure 5 is a simplified flow chart illustrating the basic operation of an alternate embodiment of the mailbox displayer according to the invention; Figure 6 is a simplified flow chart illustrating icon lookup for different mail item properties; Figure 6a is a simplified flow chart illustrating icon lookup for MEVIE type; Figure 6b is a simplified flow chart illustrating icon lookup for filetype of attachments; Figure 7 is a simplified flowchart illustrating the initialize_TypeTable function of one embodiment of the type updater component; Figure 8 is a simplified flowchart illustrating the read_TypeTable_file function of one embodiment of the type updater component; Figure 9 is a simplified flowchart illustrating the write_TypeTable_file function of one embodiment of the type updater component; Figure 10 is a simplified flowchart illustrating the read_icon_files_to_RAM function of one embodiment of the type updater component; and Figure 11 is a simplified flowchart illustrating the install_Type function of one embodiment of the type updater component. BRIEF DESCRIPTION OF THE APPENDICES Appendix A is a program listing for MACROMEDIA DIRECTOR of a mailbox displayer according to the invention; and Appendix B is a program listing for MACROMEDIA DIRECTOR of a type updater according to the invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODEVIENTS Referring now to Figure 2, electronic mail client software according to the invention has a mailbox displayer which lists messages together with an icon for each message where the icon is associated with the MEVIE type of the message. Mail which contains a file attachment is listed in the inbox with an icon indicative of the type of file attached to the email. For example, as shown in Figure 2, the mail message entitled "Minutes of Meeting" is listed with a MICROSOFT WORD icon indicating that the email message has a WORD file attached to it. The message entitled "New Radio Ad" is listed with a QUICKTEVIE WAV icon indicating that an audio file is attached to the email. The message entitled "New Ad Brochure" has an attached ADOBE ACROBAT file as indicated by the ACROBAT icon. Similarly, the message "Sales Forecast" is displayed with an EXCEL spreadsheet icon; the "Customer Database" message is displayed with a FILEMAKER PRO database icon; and the message "Year End Accounting" is displayed with a QUICKEN icon. According to the invention, the mailbox displayer interprets the MIME type of the message and/or the MIME type or document type of the attachment, if any, and selects the appropriate icon either from the icon registry in the OS or from a directory of icons maintained by the email client software. The electronic mail software of the present invention is described by example with reference to the email software of my previously incorporated parent application which includes a main email component and a number of installable components which communicate bidirectionally with the email component through an application programming interface (API). The installable components include authoring/reading components as well as at least one mailbox displayer component. Figure 2a illustrates an embodiment of the email software of my previously incorporated parent application which displays an icon indicative of the authoring/reading component associated with the mail message. This embodiment is also capable of receiving email from (and sending email to) prior art email clients. Figure 2a illustrates a mailbox list where two mail items are shown with two icons, i.e. a paper clip and an ACROBAT icon and a paper clip and a PHOTOSHOP icon. The dual icon display indicates that the mail was created without any special authoring/reading component and has an attachment created by some other program, in this case ACROBAT and PHOTOSHOP. As mentioned above, the electronic mail software of the present invention is described by example with reference to the email software of my previously incorporated parent application which includes a main email component and a number of installable components. According to the presently preferred embodiment, a component is also included for maintaining a database of icons. Figure 3 illustrates the relationship between these components. As shown in Figure 3, a data structure 10 referred to as TYPETABLE is created and maintained by a component 12 referred to as TYPE_UPDATER. A working example of a TYPEJLJPDATER according to the invention is illustrated in Appendix B which is described in more detail below. The primary purpose of the TYPETABLE is to be read by the MBOX_DISPLAYER component 14. The TYPE PDATER 12 and MBOX_DISPLAYER 14 communicate with each other using function calls and a shared data structure, TYPETABLE. For example, the MBOX_DISPLAYER includes a call to the function "initialize TYPETABLE" (306, Figure 6a) inside the TYPEJJPDATER component. The MBOX_DISPLAYER communicates with the electronic mail client software using the API described in the parent apphcation and or in previously incorporated serial number [BAK-007]. As shown in Figure 3 the MBOX_DISPLAYER component 14 and the electronic mail client software 16 also have bidirectional access to the store of electronic mail messages in the user's mail boxes. According to the presently preferred embodiment, the electronic mail messages are stored with an optional TYPE field which includes information drawn from the MIME type and subtype header fields of the message if the message is created by an installable application component of the kind described in the parent application. The MBOX_DISPLAYER component functionality is invoked by the user when a mailbox is opened, when the list of mail is scrolled, etc. Those skilled in the art will appreciate that most electronic mail chent software provides a number of different mailboxes such as inbox, outbox, read mail, sent mail, etc. The MBOX_DISPLAYER component 14 preferably includes all of the functionality of state-of-the-art mailbox displayers and also includes the functionality of looking to the TYPETABLE (and as explained in more detail below, to look into the body of a MEVIE message) to find an appropriate icon for display alongside a message title in the mailbox display. According to the presently preferred embodiment, icons are stored as small image files, e.g. EPS files or GIF files, and are pointed to by the TYPETABLE data structure. In order to accommodate the use of different size fonts in the mailbox display, means for scaling the size of the icon graphics are also provided. Three methods may be used. First, the image may be scaled using a standard interpolation algorithm. Second, multiple copies of icon images with different resolutions may be stored and retrieved to match a limited number of font point sizes. Third, and presently preferred, a combination of the first two methods is used whereby at least one image for each icon is stored, the icon most closely matching the point size of the font is chosen and then scaled as needed to better match the font point size. Table 1 illustrates how the TYPETABLE data is stored in permanent storage (e.g. hard disk). Table 1 Table 1 illustrates at least five mimetypes. The first four are mimetypes which utihze installable components for authoring/reading. The installable components are indicated by the ".dxr" file extension. The multipart/mixed (fifth) mimetype iUustrated in Table 1 indicates an attachment created with an external application rather than an installable component. As mentioned above with reference to Figure 2a, a generic paper clip icon is used to distinguish this attachment from mail messages created with installable components. Table 2 illustrates the typetable data structure as it is loaded into RAM. Table 2 When the data structure TYPETABLE is loaded into RAM it is referred to as SG_TYPETABLE and has a structure as shown in Table 2. This structure includes a pointer to the icon. The pointer in the exemplary embodiment is a LINGO castmember. As mentioned above, according to the exemplary embodiment, when the email message has an attached file, a generic attachment icon is displayed and an icon particular to the attachment is also displayed. This second icon is pointed to by a data structure in RAM which is created on the fly (e.g. as illustrated in Figure 6b) referred to as SG_ATTACH_TYPETABLE. The basic structure of SG_ATTACH_TYPETABLE is illustrated in Table 3. Table 3 As shown in Table 3, the file extension is associated with an icon pointer and the pathname to the program which will be used to read the attachment. As discussed in more detail below with reference to Figure 6b, the SG_ATTACH_TYPETABLE is built on the fly using icons from the system registry. A presently preferred embodiment of a MBOX_DISPLAYER component is presented in detail in Appendix A which is similar to Appendix B of my previously incorporated parent application. The code listing shown in Appendix A hereto differs from the code listing of the parent application starting at line 287 which is the start of the main mailbox display function. The main mailbox display function is also illustrated by the flowchart of Figure 4 Referring now to Figure 4 and Appendix A, the function starts at line 287 in Appendix A and at the START 101 in the flowchart of Figure 4. Before displaying the mailbox contents, pointers to the TYPETABLE and associated system features are set up as illustrated at lines 293-300 in Appendix A and at 103, 105 in Figure 4. The various mailbox fields, e.g. message number, subject, date, message read indicator, are cleared at lines 302-307 in Appendix A and at 107 in Figure 4. "Sprite channels" (MACROMEDIA graphic holders) which will be used to display icon graphics are cleared at lines 309-311 in Appendix A and at 107 in Figure 4. Next the message list is displayed starting at line 313 in Appendix A and at 109 in Figure 4. The elements which make up each line of the mailbox display (e.g. the message subject, the date, the sender's name, as well as the graphical elements) are referred to as "properties". These properties are read from the message at lines 320-326 in Appendix A and at 111, 113 in Figure 4. With the exception of mailbox, mimetype, and status, all of the properties are automatically displayed when read as illustrated at 111 in Figure 4 and lines 320-323 in Appendix A. The mailbox, mimetype, and status properties are read at 113 in Figure 4 and lines 324-326 in Appendix A. According to the presently preferred embodiment, the mimetype icon is also used to display message status. If the message has been read, the icon is displayed in greyscale. If the message has not been read, the icon is displayed in color. The steps of finding the icon and setting it to greyscale or color are illustrated at lines 328-355 of Appendix A. The sprite channel counter is set at lines 332-334 in Appendix A and at 115 in Figure 4. The TYPETABLE data structure is parsed at lines 340-343 in Appendix A and at 117 in Figure 4. If the TYPETABLE does not contain the icon indicated by the mimetype for this message, then a default icon is chosen at lines 344-346 in Appendix A and at 119 in Figure 4. If the status for the message indicates that it (its attachment) has been read, then the greyscale version of the icon is set at lines 348-349 in Appendix A and at 121 in Figure 4. The chosen icon is added to an icon list for rapid access during scrolling of the mailbox contents list. This is illustrated at lines 351-352 in Appendix A and at 123 in Figure 4. The remainder of the main mailbox display function at lines 354-374 in Appendix A and at 125 in Figure 4 concern locating the text and icons at appropriate screen locations. The code shown at lines 315-374 repeats for the number of messages in the mailbox as illustrated by the decision at 127 in Figure 4. When there are no more messages to be listed, the main mailbox display function ends as illustrated at 376 in Appendix A and 129 in Figure 4. Though not presently illustrated in the code or flowchart, as mentioned above, if there is no appropriate icon in the directory of icons, the mailbox displayer uses icon image data contained in a subpart of the MEVIE message if it is available. Those skilled in the art will appreciate that this functionality is easily performed by reading the icon image data from the location in the MIME file which is defined by the standard(s) referenced above. Code to implement this might be inserted at line 325 of Appendix A or at line 345 of Appendix A. As mentioned above, the remainder of Appendix A is substantially the same as the mailbox component of Appendix B of the parent application and the description of it is adequately set forth in the previously incorporated parent application. Those skilled in the art will appreciate that the code listings of the Appendices are particular to the MACROMEDIA DIRECTOR development suite and that the same functionality may be achieved using a different development environment. Figure 5 illustrates the functionality of the mailbox display function in a more generic manner which can apply to different programming languages. Referring now to Figure 5, the mailbox display starts at 201 to read the list of messages. It checks at 202 to determine whether the TYPETABLE has been initialized. If it has not, the TypeTable is initialized at 204 as described in detail below with reference to Figure 7. The mailbox display gets the next message listing at 203. For the message listing obtained at 203, the mailbox proceeds to obtain properties for the listing at 205 and property values at 207. If it is determined at 209 that the property uses an icon for display, a "get icon" routine is called at 211 (this routine is illustrated at Figure 6). The message properties that concern the present application are (a) the message MEvIE type and (b) whether the message has a file attachment. In the flow charts in Figure 5 (209) the system looks up whether current message property which is implemented as a LINGO symbol, e.g. #type, #date, #mailbox, #status, is represented by an icon. Although in the current implementation, each property is coded separately, the more general implementation described in the flowchart of Figure 5 could be accomplished by checking whether the target symbol, e.g. #type was an element of a list data structure, e.g. Properties_with_Icons = (#type, #has_attachment) in procedure 209 of Figure 5. The icon is displayed at 213. If it was determined at 209 that the property does not use an icon, the property value is displayed at 215. At 217 it is determined whether there are additional properties for this message listing. If there are, the program returns to 205. If there are not, it is determined at 219 whether there are more message listings to list. If there are, the program returns to 203. If there are not, the program ends at 221. Figure 6 illustrates a generalization of the functionality contained in Appendix A at lines 328-350. This is the generalized "get icon" routine called at 211 in Figure 5. The routine starts at 301 having been provided the property name and property value by the calling program. If it is determined at 303 that the property is "mimetype" or, to conform to the L NFGO implementation, "#type", the icon of the mimetype is obtained at 305 and a pointer to the icon is passed back to the calling program at 307. The actual steps involved in getting the icon for a mimetype are illustrated in Figure 6a. If it is determined at 309 that the property is "has attachment", the icon for "has attachment" is obtained at 311 and a pointer to the icon is passed back to the calling program at 307. The procedure that gets the file attachment icon is described in Figure 6b for a Microsoft Windows platform. Alternatively, the TYPETABLE data structure could include a field for filetype that is used to map from file extensions to MEVIE types and MEvTE type icons. If TYPED ATA were modified in this way, both message type and file type icon lookups would use the TYPETABLE. A related modification in the TYPEJJPDATER would be required to install the filetype/MEvCEtype associations as they are encountered either via a previously unknown message type or a previously unknown file type. Because file type extensions are not as rich as Mimetypes, the same file type extension may map to many different MIME types. For example this could occur for different versions of the same software if the software manufacturer assigns different MIME subtypes for different versions of their software. If it is determined at 313 that the property is "message read", the icon for "message read" is obtained at 315 and a pointer to the icon is passed back to the calling program at 307. If it is determined at 317 that the property is "priority", the icon for "priority" is obtained at 319 and a pointer to the icon is passed back to the calling program at 307. From the foregoing, those skilled in the art will appreciate that many different icons can be displayed for different properties. Figure 6a illustrates a generalization of the implementation contained at lines 328-346 of Appendix A. This is the "get icon for mimetype" function called at 305 in Figure 6. This routine starts at 302 having been given the "mimetype" by the calling program. It determines at 304 whether the TYPETABLE has been initialized. If not, initialization is performed at 306. The initialization routine may reside in the TYPEJJPDATER component or may call functions that reside in the TYPEJJPDATER component. For example, in the LINGO implementation, the function Read_TypeTable_File (Figure 8), which is part of the TYPEJJPDATER component is used to initialize the TYPETABLE data structure. After initialization, or if it was determined at 306 that the TYPETABLE was already initialized, the mimetype is used to retrieve an icon pointer from the TYPETABLE at 308. See Appendix A, lines 328-342. It is determined at 310 whether the icon pointer is null. If it is, an "install message type" routine is called at 312. The "install message type" routine, which is contained in the TYPEJJPDATER component, is explained in detail below with reference to Figure 11 which illustrates the installation of new message handlers and icons for mimetypes. If the icon pointer is not null, it is determined at 314 whether the icon pointer points to "icon not installed". Ii that is the case, the icon pointer is set to the default pointer at 316. In either case, a non-null pointer is returned to the calling program at 318. Figure 6b illustrates an exemplary procedure for getting an icon for an attachment to an email message. Starting at 320, the file extension of the attachment is read. (Note that on a Windows platform, the three letters following "." in a filename determine the "filetype". With other platforms, such as the Macintosh platform, the filetype and "creator code" are listed in the "resource fork" of the file. Thus, for those platforms, the first step will be to read the filetype (and creator code) from the resource fork of the file.) Once the filetype (or filetype and creator code) have been determined, the routine attempts at 322 to find an appropriate icon in the SG_TYPETABLE. If it is determined at 324 that no appropriate icon has been found, the routine attempts at 326 to find an appropriate icon in the SG_ATTACH_TYPETABLE. If it is determined at 328 that no appropriate icon has been found, the routine attempts at 330 and 332 to find an appropriate icon in the system registry. (Note that with other operating systems, icon resources may be stored in different places. E.g., in the Macintosh OS, icon resources are stored in the invisible "desktop" file.) If at 334 a suitable icon is found, a pointer to the icon is set at 336 and the pointer is written to the SG_ATTACH_TYPETABLE at 338. The icon pointer is returned to the mailbox displayer at 340. See 311 in Figure 6 and 211 in Figure 5. If a suitable icon is not found at 342, no icon pointer is provided. Turning now to Appendix B, lines 1-26 provide an overview and introduction to the Type Updater. The Type updater includes eleven functions. Three of the them are public functions called by the mailbox displayer. These include: Initialize_TypeTable, Install_Type, and Uninstall_Type. The remaining eight functions are private functions used within the Type Updater. These include: Write_Typetable_File, Read_Typetable_File, ReadJcon_Files_To_RAM, readJconFile, delete_mimetype, insert_mimetype, delete_filetype, insert ϊletype. The Initialize_TypeTable function is illustrated in Figure 7 and at lines 29-60 in Appendix B. The function begins at 360 in Figure 7, sets the SG_TYPETABLE to nil at 362 (line 39 in Appendix B). The SG_ATTACH_TYPETABLE is set to nil at 364 (line 43 in Appendix B). The Typetable file stored on disk is read into SG_TYPETABLE at 366 (line 44 in Appendix B). The read_typetable_file internal function is illustrated in Figure 8 and at lines 207-252 in Appendix B. An error check is performed at 368 (line 46 in Appendix B) to determine whether any data was loaded into RAM. If no data was read, the user is alerted at 370 (line 47 in Appendix B) and a failure is returned at 372 (line 48 in Appendix B). Otherwise, icon files are read into RAM at 374 (line 51 in Appendix B). An error check is performed at 376 (line 47 in Appendix B). If the data was read successfully, the function ends at 378 (line 60 in Appendix B). Turning now to Figure 8 and at lines 207-252 in Appendix B, the read ypetable_file function starts at 380 (line 218 in Appendix B). The SG_TYPETABLE is set to nil at 382 (line 222 in Appendix B). The typetable.txt file is opened at 384 (lines 224-227 in Appendix B) and a file open error check is performed at 386 (line 229 in Appendix B). If an error in opening the file is detected, an error alert is produced at 388 and (line 230 in Appendix B), the file is closed at 390 (line 231 in Appendix B), and a SG_TYPETABLE is returned at 392 (line 232 in Appendix B). If the file was opened without error, the first line is read at 391 which begins a loop (steps 394-408) which ultimately ends at 394 when the end of file is reached after which the file is closed at 390 (line 231 in Appendix B), and a SG_TYPETABLE is returned at 392 (line 232 in Appendix B). As shown in Appendix B at lines 235-239, the LINGO implementation reads the entire file into a string and simulates line by line reading because LTNGO cannot read line by line. When a line is read, the first word in the line is the mimetype (line 243 in Appendix B). The mimetype is inserted into SG_TYPETABLE at 396 (line 244 in Appendix B). If the mimetype is not defined as discovered at 398, the user is alerted at 400 and the next line is read at 391. If the mimetype is defined, the next word in the line (filetype) is read and inserted into SGJTYPETABLE at 402 (hne 245 in Appendix B). The next word in the line (iconFileName) is read and inserted into SGJTYPETABLE at 404 (line 246 in Appendix B). The next word in the line (msgHandler) is read and inserted into SGJTYPETABLE at 406 (line 247 in Appendix B). Any errors detected at 408 are reported at 400. As mentioned above, the process continues until the typetable.txt file is completely read. The function Write_TypeTable_File is described in Figure 9 and at lines 159-206 of Appendix B. This function writes the contents of SGJTYPETABLE back to typetable.txt after new mimetypes and icons have been added to the SGJTYPETABLE via the InstallJType function described below with reference to Figure 11. The Write_TypeTable_File function begins at 410 (line 163 in Appendix B) and first checks at 412 (line 168 in Appendix B) whether the SGJTYPETABLE structure is empty. If it is empty, it returns an error message at 414 (line 169 in Appendix B) and a failure message at 416 (line 170 in Appendix B). If the SGJTYPETABLE structure is not empty a backup copy of the typetable.txt file is created at 418 (line 173 in Appendix B) and a new empty file is created at 420 (lines 176-180 in Appendix B). An error check is performed at 422 (line 181 in Appendix B) and if an error is detected in creating the new file, an error message is returned at 424 (line 182 in Appendix B). The backup file is restored at 426 (line 183 in Appendix B) and a return code is set to "fail" at 428 (line 184 in Appendix B). The typetable.txt file is closed at 430 (line 203 in Appendix B). The backup is deleted at 432 (hne 204 in Appendix B) and the return code is returned at 434 (lines 205-206 in Appendix B). If there is no error creating the new file, it is opened for write access at line 187- 188 in Appendix B and a starting line counter is set at line 191. The first (next) entry in the SGJTYPETABLE is read at 436 (line 192 in Appendix B). If it is determined at 438 (line 193 in Appendix B) that the end of SGJTYPETABLE has been reached, the return code is set to "success" at 440 (line 201 in Appendix B), the file is closed 430, the backup is deleted 432 and the return code is returned 434. Until the end of SGJTYPETABLE is reached, data is set to write at 442 and the mimetype is written at 446 (line 194 in Appendix B) to a string. The filetype, iconfilename, and messagehandlerfilename are added to the string at 446, 448, and 450 respectively (lines 195-197 in Appendix B). The string is written to the new typetable.txt file at 452 (line 198 in Appendix B) and a line delimiter is written at 454 (lines 199-200 in Appendix B). The function loops back to 436 and continues until all of the entries in SGJTYPETABLE are read and written to the new typetable.txt file. Figure 10 illustrates the function ReadJcon_Files_To_RAM which is presented in Appendix B at lines 255-290. Starting at 456 in Figure 10 (line 255 in Appendix B), the function first determines at 458 (line 259 in Appendix B) whether any mimetypes are defined in the structure SGJTYPETABLE. If there are none, no icons are defined, an error message is returned at 460 (line 260 in Appendix B), the return code is set to "fail" at 462 (line 261 in Appendix B) and the return code is returned at 464 (lines 261-262 in Appendix B). If the structure SGJTYPETABLE is not empty, the function loads the default icon into RAM and sets a pointer to it at 466 (line 265 in Appendix B). Icon pointer numbers are related to LINGO castNumbers at line 268 in Appendix B and a counter for incrementing the casfNumbers is set at line 270. The first (next) entry in the structure SGJTYPETABLE is read at 468 (line 271 in Appendix B). If it is determined at 470 (line 272 in Appendix B) that there are no more entries to read, the return code is set to "success" at 472 and the return code is returned at 464 (line 288 in Appendix B). So long as entries remain, the mimetype is read at 474 and the iconfilename is for the mimetype is read at 476 (line 273 in Appendix B). If it is determined at 478 (hne 274 in Appendix B) that there is no icon associated with this mimetype, the default icon pointer is assigned to it at 480 (line 275 in Appendix B). Otherwise, the next icon bitmap and pointer are read at 482 (line 277 in Appendix B) using the function readjconfile (lines 295-298 in Appendix B). If the icon pointer is not nil as determined at 484 (line 278 in Appendix B), the castNum is incremented at line 279. Otherwise the castNum is not incremented and the default icon pointer is used at 480 (line 280 in Appendix B). In either case, the icon pointer associated with the mimetype is inserted at 486 (line 283 in Appendix B). The counter is incremented at line 284 and the next entry from SGJTYPETABLE is read at 468 (line 285 in Appendix B). Figure 11 illustrates the function installjype which is used to install a new icon and/or message handler for a particular mimetype or filetype. The function starts at 600 with input which includes an icon file name, a message handler program name, and either a mimetype or a filetype (lines 71-75 in Appendix B). This input can be provided by the user or by an automatic means as described below. The typetable file is read into RAM at 602 (line 78 in Appendix B) thereby creating SGJTYPETABLE. If SGJTYPETABLE is empty as determined at 604 (line 80 in Appendix B), an error is returned at 606 (lines 81-82 in Appendix B). Otherwise, the mimetype (or filetype) specified at 600 is retrieved at 608 (line 87 in Appendix B) from SGJTYPETABLE if it exists. If the mimetype (or filetype) exists in SGJTYPETABLE and if it is already associated with an icon and message handler, the user is prompted at 612 (line 90 in Appendix B) whether it should be redefined. If the user chooses NO, an error is returned at 614 (line 94 in Appendix B). If the mimetype was not previously defined or if the user chooses to redefine it, the message handler program specified at 600 is checked for validity (e.g. whether it is present on the hard disk or network) at 616 (line 102 in Appendix B). If it is not valid, an error is returned at 614 (lines 104-105 in Appendix B). If the message handler and the mimetype (filetype) are valid, they are associated with each other in SGJTYPETABLE at 618 (line 108 in Appendix B). Next, the icon file name specified at 600 is checked for validity at 620 (line 110 in Appendix B). If it is not valid, the default icon is specified at 622 (line 112 in Appendix B) and an error alert is returned at 624 (line 111 in Appendix B). In either case, the icon file name specified or the default icon, if necessary, is associated with the message handler and the mimetype (filetype) in SGJTYPETABLE at 626 (line 114 in Appendix B). The typetable.txt file is written back from SGJTYPETABLE at 628 (lines 122-125 in Appendix B) and unless an error is encountered, a success is returned at 630 (line 126 in Appendix B). Those skilled in the art will appreciate that the installjype function can be called by another program so that icons are automatically installed/removed when modular authoring/reading components are installed/removed. Though not specifically shown in code or drawings herein, those skilled in the art will appreciate how to implement this second embodiment by referring to Appendix B herein and the component installing code of the parent apphcation. According to a third embodiment, new icons are added automatically whenever a new message type is encountered by the mailbox displayer. The new icon is retrieved from either the operating system registry or from the icon image data embedded in the message. Those skilled in the art will appreciate the implementation of this embodiment by reference to Appendix B herein and the above referenced MEVTE standards. According to a fourth embodiment, the type updater automatically queries a network server for new icon information and downloads icon image data as needed or as scheduled. Those skilled in the art will appreciate that automatic updaters which download data from a file server are well known and that this embodiment may be implemented by reference to the known automatic updaters together with Appendix B herein. There have been described and illustrated herein several embodiments of an enhanced electronic mail system including methods and apparatus for identifying mime types and for displaying different icons. While particular embodiments of the invention have been described, it is not intended that the invention be limited thereto, as it is intended that the invention be as broad in scope as the art will allow and that the specification be read likewise. Thus, while particular code listings have been disclosed, it will be appreciated that other code could be utilized. For example, although the Appendices illustrate the invention with MACROMEDIA DIRECTOR LTNGO code, the invention could be embodied with C++, based on a "MOZΓLLA" engine, or via a number of other popular development tools. Also, while the invention has been disclosed with reference to the applicant's parent apphcation which involves an email client having installable authoring/reading components, it will be recognized that the principles disclosed herein for displaying icons representing mimetypes in a mailbox listing may be applied to other kinds of email clients. Moreover, while particular configurations have been disclosed in reference to the way icon images are stored (i.e. scalable images), it will be appreciated that other configurations could be used as well. Further, while the invention has been shown with reference to display on a computer screen, it will be appreciated that the display may be on a television, a personal digital assistant, a cell phone, a wrist watch, etc. It will therefore be appreciated by those skilled in the art that yet other modifications could be made to the provided invention without deviating from its spirit and scope as so claimed. Appendix A - Mailbox Displayer Code - Page 1 — MBOX J)ISPLAYER IMPLEMENTATION Code for a mailbox handler for the KidCode electronic mail client. This Director MIAW displays a mailbox in a window as a list — of messages with one line for each message. Each message has the following fields displayed: — 1. message number — 2. Message sender — 3. Message mimetype & status (single icon used to indicate both properties) — 4. Message subject header — 5. Message date on startMovie global SG JastActiveWindow — super global that keeps track of KC last active window global mbxG_username — current user name global mbxG_messages — list of messages global mbxG_nMsgs — number of messages in mailbox global mbxG JoxName — current mailbox name global mbxG_whichLine — current hilite line = msgNumber global mbxG_subtractLine global mbxGJips set mbxGJips = 0 — called by API to Main Movie tell the stage to emh_continue(#mailbox) end on activate Window global SGJastActive Window global mbxG_my Window set SG JastActiveWindow = mbxG_my Window end activateWindow — Stop movie handlers StopMovie handler in a MIAW is called only when the movie — plays through to the end or jumps to another movie. — It isn't called when the window is closed or the window — is deleted by the forget window command. on stopMovie cleanUpMovieO end called to close a MIAW or automatically whenever — forgetWindow is called on closeWindow cleanUpMovieO Appendix A - Mailbox Displayer Code - Page 2 end — clean UpMovie can be called by both stopMovie and — closeWindow. on cleanUpMovie global mbxG_whichLine global mbxG_subtractLine global mbxG_nMsgs global mbxG_username global mbxGJips — CLEAR FIELDS AND GLOBAL VARIABLES put "" into field "MailboxTitle" put "" into field "prepositionTitle" put "" into field "MessageNumber" put "" into field "MailboxTo" put "" into field "MailboxSubject" put "" into field "MailboxDate" put "" into field "Messageread" set mbxG_nMsgs = 0 set mbxGJips = 0 resetHiliteO if findEmpty(member 50) > 50 then set the scriptText of member 50 = "" end if set the memberNum of sprite 6 = the memberNum of member "lips up" set the loc of sprite 4 to point(800, 4) set the loc of sprite 5 = point(800, 19) end cleanUpMovie — API Public Handlers — — Ugly hack to work around problem with Director startup — of MIAWs. The problem is that, after calling a handler in the — MIAW, the StartMovie handler for the MIAW does not run until — the calling movie advances to its next frame. — Therefore, the calling sequence in the calling movie — has to be engineered so that the real handlers in the MIAW do not — run until after control has been transfered back to the calling — movie. However, at least one handler in the MIAW must be called — by the calling movie before the StartMovie handler will run. — startMeUp is the fake handler that, when called by the — main movie, will upon return to the main movie, Appendix A - Mailbox Displayer Code - Page 3 103 — cause this movie's StartMovie handler to run. 104 105 — The second part of this wormy hack is contained in the MIAW' s 106 — StartMovie handler... It is a call to a workAround handler in 107 — the calling movie called continueComponent 108 — The calling movie's continueRebus handler calls the real handlers 109 — in the MIAW. 110 111 on emc_startMeUp 112 — put "Macromedia sucks !" 113 return(TRUE) 114 end emc_startMeUp 115 116 117 initWindow is called by email main when a message handler 118 — is opened 119 120 on emcJnitWindow userName, windowName 121 global mbxG_my Window 122 global mbxG_usemame 123 global mbxG_platformType 124 125 — put "ENTER emc nitWindow mailbox" 126 set mbxG_username = userName 127 set mbxG_my Window = windowName 128 129 — puppet the hilite (MB 4- 17-99) removed this 130 resetHiliteO 131 tell the stage to emh_getColorDepth() 132 set colorDepth = the result 133 mapColors(colorDepth) 134 tell the stage to emh_getPlatformType() 135 set mbxG_platformType = the result 136 137 — put "EXIT emc nitWindow mailbox" 138 139 return(TRUE) 140 141 end emcJnitWindow 142 143 144 — close Window is not called unless Rebus plays as 145 — a MIAW. 146 147 on emc_close Window 148 — put "ENTER emc_closeWindow Mailbox" 149 close Window() 150 — step frame 151 — put "EXIT emc_close Window Mailbox" 152 retum(TRUE) 153 Appendix A - Mailbox Displayer Code - Page 4 154 end emc_closeWindow 155 156 157 158 on emc_getComponentInfo 159 return( list( "SimpleMail", 1, #mailbox, "text" ) ) 160 end emc_getComponentInfo 161 162 163 164 on mbx_getMessage 165 — 166 "open" button and doubleClick of highlighted message 167 calls to email main to hand the message 168 selected to a message handling movie 169 This script was previously the "open" cast memeber script: 170 — 171 — global mbxG_whichLine 172 — global mbxG_messages 173 — 174 — set mailData = getAt(mbxG_messages, mbxG_whichLine) 175 — 176 — return(mailData) 177 — 178 — 179 — 180 — end mbx_getMessage 181 182 183 184 on mbx_getMessageNumber 185 global mbxG_whichLine 186 return(mbxG_whichLine) 187 end mbx_getMessageNumber 188 189 190 — mbx JrashMessages returns a list of messages that are to 191 — be trashed in the mailfile. Email main will rewrite the mail file 192 — When implemented correctly, it will determine which message numbers 193 — are associated with the currently selected lines in the mailbox 194 — display, update the display to remove these messages from the 195 — list, and return the list of deleted message numbers. 196 197 on mbx JrashMessages 198 199 global mbxG_messages — list of messages 200 global mbxG_nMsgs — number of messages in mailbox 201 global mbxG_whichLine — current hilite line = msgNumber 202 203 — set mailData = getAt(mbxG_messages, mbxG_whichLine) 204 — Appendix A - Mailbox Displayer Code - Page 5 205 tell the stage 206 — return(mailData) 207 end tell 208 209 — needs implementation that can handle multiple messages 210 — also need to rewrite trashlt which does not conform to 211 — API rule that only API handlers can be called in other movies 212 — 213 — set message = mbxG_messages 214 if mbxG_whichLine > 0 AND mbxG_whichLine <= mbxG_nMsgs then 215 tell the stage to emh_alertUserToTrash() 216 set yes = the result 217 if not yes then return [] — user canceled 218 219 set trashList = list(getAt(mbxG_messages, mbxG_whichLine)) 220 deleteAt(mbxG_messages, mbxG_whichLine) 221 set mbxG_nMsgs = mbxG_nMsgs - 1 222 displayMailbox(mbxG_messages) 223 resetHiliteO 224 else 225 alert("Please click on the message you wish to delete.") 226 set trashList = [] 227 end if 228 229 return(trashlist) 230 231 end mbxJrashMessages 232 233 234 — accepts a mailbox datastructure that consists of a boxname and 235 — a list of messages 236 237 on mbx_openMailbox mailbox 238 global mbxG_usemame 239 global mbxG_messages 240 global mbxGJioxName 241 global mbxG_nMsgs 242 243 — put "ENTER mbx_openMailbox" 244 set mbxGJjOxName = getAt(mailbox, 1) 245 put mbxG_userName & "'s " & mbxGJ>oxName into field "mailboxTitle" 246 247 set mbxG_messages = getAt(mailbox, 2) 248 set mbxG_nMsgs = count(mbxG_messages) 249 250 displayMailbox(mbxG_messages) 251 252 — put "EXIT mbx_openMailbox" 253 return(TRUE) 254 255 end mbx_openMailbox Appendix A - Mailbox Displayer Code - Page 6 256 257 258 259 Utilities - 260 261 Initialize formatting of text fields 262 — Thanks to Frank Leahy for this one 263 264 on SetTextlnfo fidName, fldValue, fldAlign, fldFont, fldSize, fldStyle 265 if fldValue o EMPTY then 266 put fldValue into field fidName 267 end if 268 set the textAlign of field fidName = fldAlign 269 set the textFont of field fidName = fldFont 270 set the textSize of field fidName = fldSize 271 set the textStyle of field fidName = fldStyle 272 end 273 274 275 on formatFields 276 277 — FORMAT THE TEXT FIELDS 278 279 setTextlnfo "MessageNumber", " ", "left", "arial", 14, "bold" 280 setTextlnfo "MailboxTo", " ", "left", "arial", 14, "bold" 281 setTextlnfo "MailboxSubject", " ", "left", "arial", 14, "bold" 282 setTextlnfo "MailboxDate", " ", "left", "arial", 14, "bold" 283 setTextlnfo "Messageread", " ", "left", "arial", 14, "bold" 284 285 end formatFields 286 287 — MAIN MAILBOX DISPLAY FUNCTION 288 — displays a Mailbox style listing of messages 289 — places the appropriate components from each message 290 — into field members with lines aligned for display 291 292 on displayMailBox msgList 293 global SGJTYPETABLE — super global variable shared across different MIAWS 294 global mbxG_red 295 global mbxG_platformType 296 global mbxG JconList 297 298 — mbxG JconList for future use in up/down scroll scripts 299 set mbxG JconList = [:] 300 set count = 0 301 302 — first clear all the fields and the sprites 303 put "" into field "MessageNumber" 304 put "" into field "MailboxTo" 305 put "" into field "mailboxSubject" 306 put "" into field "mailboxDate" Appendix A - Mailbox Displayer Code - Page 7 307 put "" into field "Messageread" 308 309 repeat with i = 40 to 70 310 set the member of sprite i = member "blank" 311 end repeat 312 313 — Fill the text fields with info from all of the messages so that it is available 314 — when the window scrolls 315 repeat with msg in msgList 316 317 with the exception of mailbox, mimetype and status, 318 the fields will automatically be displayed when filled 319 320 put the lineCount of member "MailboxTo"+l & RETURN after field "MessageNumber" 321 put getProp(msg, #from) & RETURN after field "MailboxTo" 322 put getProp(msg, #subject) & RETURN after field "mailboxSubject" 323 put getProp(msg, #date) & RETURN after field "mailboxDate" 324 put getProp(msg, #mailbox) into mailbox 325 put getProp(msg, #mimetype) into mime 326 put getProp(msg, #status) into status 327 328 Display the mimetype icon 329 We use the mimetype icon to also indicate message status. A greyscale version of the 330 — icon is displayed if a message has been read. Otherwise a color icon is displayed. 331 332 Icons will be placed in sprite channel 40 and beyond 333 set i = 40 + count 334 set count = count + 1 335 336 — find the icon for the message mimetype 337 this code should be rewritten using a data access function. For now we need to 338 know the format of the TYPETABLE data structure 339 340 set mimeProperties = getProp(SG_TYPETABLE, mime) 341 set iconCastMember = getAt(mimeProperties, 2) — second item is the cast member 342 number 343 344 — if this type is unknown then use the default icon 345 if iconCastMember = 0 then set iconCastMember = the number of member 346 "Defaultlcon" 347 348 — get the greyscale version of the icon if the message has been read. 349 if status = "R" then set iconCastMember = iconCastMember + 1 350 351 — add the icon to the list of icons used for scrolling the window 352 append (mbxJconList, iconCastMember) 353 354 — place the icon at the proper location for display 355 set the memberNum of sprite i to iconCastMember 356 357 — display the icon in the correct grid cell in the mailbox message list. 28 Appendix A - Mailbox Displayer Code - Page 8 358 — set the locH of all icons to 50 359 set whereGoesIcon = the lineCount of member "MailboxTo" 360 puppetSprite i, TRUE 361 set the visible of sprite i = TRUE 362 set the locH of sprite i to 50 363 364 — precise placement of the icon next to it's message... 365 set positonVar = 105 + linePosToLocV(member "MailboxTo", whereGoesIcon) 366 set the locV of sprite i to positonVar 367 — but don't let icons fall go beyond window if there are many messages 368 if positonVar > 550 or positonVar < 105 then 369 set the visible of sprite i = FALSE 370 else 371 set the visible of sprite i = TRUE 372 end if 373 addProp mbxGJconList, (the locV of sprite i), mime 374 end repeat 375 376 end displayMailbox 377 378 — FUNCTIONS USED TO RESPOND TO USER INTERACTION WITH MAILBOX 379 — HILITE MESSAGE is called when a user clicks a mouse on a message line 380 381 on hiliteMessage whichLine 382 global mbxG_nMsgs, mbxG_whichLine, mbxG_subtractLine, mbxG_messages 383 384 — KEEP TRACK OF SELECTED LINE 385 386 set mbxG_ whichLine = whichLine 387 388 — MAKE SURE LINE IS VALID 389 390 if mbxG_whichLine <= 0 then 391 return(O) — do nothing, errors are caught elsewhere 392 else if mbxG_whichLine > mbxG_nMsgs then 393 — user clicked somewhere else in field 394 set mbxG_whichLine = 0 — reset to 0 395 return(O) 396 end if 397 398 — HIGHLIGHT SELECTED LINE 399 400 set whichHighlight = mbxG_whichLine + mbxG_subtractLine 401 402 — since all field members in display are kept synchronized 403 — any one will do for linePosToLocV 404 — use "MailboxTo", it's small 405 406 set the locV of Sprite 11 to -> 407 (99 + linePosToLocV(member "MailboxTo", whichHighlight)) 408 Appendix A - Mailbox Displayer Code - Page 9 409 — when the user double clicks on a hilited message, go get it from mailFDe 410 411 if the doubleClick then 412 set maildata = getAt(mbxG_messages, mbxG_whichLine) 413 tell the stage 414 emh_openMessage(maildata) 415 end tell 416 — mbx_getMessage() 417 end if 418 419 end hiliteMessage 420 421 422 423 on resetHilite 424 global mbxG_whichLine, mbx_subtractLine 425 426 set mbxG_whichLine = 0 427 set mbxG_subtractLine = 0 428 429 — SET HIGHLIGHT OFF STAGE 430 set the loc of sprite 11 to point (11, -20) 431 432 end resetHilite 433 434 — this is a lookup table for color 435 — only really necessary for Mac platform 436 — use on any color that you want to 437 — set the forecolor of field 438 439 on mapColors colorDepth 440 global mbxG_red 441 global mbxGJilue 442 global mbxG_white 443 global mbxGJ>lack 444 445 case colorDepth of 446 447 8: 448 set mbxG_red = 6 449 set mbxG_blue = 4 450 set mbxG_white = 0 451 16: 452 set mbxG_red = 31744 453 set mbxG_blue = 31 454 set mbxG_white = 32767 455 32: 456 set mbxG_red = 16711680 457 set mbxG_blue = 255 458 set mbxG_white = 16777215 459 Appendix A - Mailbox Displayer Code - Page 10 460 end case 461 462 set mbxG_black = the forecolor of Une 1 of member the member of sprite 4 463 464 end mapColors 465 466 467 scripts run when the mouse is clicked on a mailbox message line. 468 A script is needed for each field in the message line. 469 470 on mouseUp 471 hiliteMessage (the clickon - 40) 472 end 473 474 475 on mouseDown 476 477 global mbxGJips 478 set whichLine = the mouseLine 479 if mbxGJips then 480 set astr = line whichline of field "MailboxTo" 481 speak(astr) 482 else 483 hiliteMessage(whichLine) 484 end if 485 end 486 487 on mouseDown 488 489 global mbxGJips 490 set whichLine = the mouseLine 491 if mbxGJips then 492 set astr = hne whichline of field "MailboxSubject" 493 speak(astr) 494 else 495 hiliteMessage(whichLine) 496 end if 497 end 498 499 500 more scripts run when the mouse is clicked on a mailbox message line 501 502 on mouseDown 503 global mbxGJips 504 set whichLine = the mouseLine 505 if mbxGJips then 506 507 set astr = line whichline of field "MailboxDate" 508 set aday = word 1 of astr 509 case aday of 510 "Mon,": put "Monday" into word 1 of astr Appendix A - Mailbox Displayer Code - Page 11 511 "Tue,": put "Tuesday" into word 1 of astr 512 "Wed,": put "Wednesday" into word 1 of astr 513 "Thu,": put "Thursday" into word 1 of astr 514 "Fri,": put "Friday" into word 1 of astr 515 "Sat,": put "Saturday" into word 1 of astr 516 "Sun,": put "Sunday" into word 1 of astr 517 otherwise 518 end case 519 520 speak(astr) 521 else 522 hiliteMessage(whichLine) 523 end if 524 end 525 526 on mouseDown 527 global mbxGJips 528 529 set whichLine = the mouseLine 530 if mbxGJips then 531 set astr = line whichline of field "MessageNumber" 532 speak(astr) 533 else 534 hiliteMessage(whichLine) 535 end if 536 end 537 538 539 — this script is attached to the message type icon which is displayed in the message line 540 541 on mouseUp 542 set whichLine = the mouseLine 543 hiliteMessage(mouseLine) 544 end 545 546 code for scroll buttons 547 548 on mouseDown 549 global mbxG_whichLine 550 global mbxG_subtractLine 551 global mbxG JconList 552 553 — SCROLL UP WITH HIGHLIGHT 554 — ICONS NOW SCROLL... HOWEVER, ICON SPRITE POSITION IS BASED ON 555 — MBXG_SUBTRACTLINE, NOT ON THE THE ACTUAL CORRESPONDING LINE 556 NUMBER 557 — OF THE MESSAGE IN THE MAILBOX WINDOW. 558 559 set numberOflconsVar = count(mbxG JconList) 560 set lastlconPos = getPropAt(mbxG JconList, count(mbxG JconList)) 561 if lastlconPos >= 550 then Appendix A - Mailbox Displayer Code - Page 12 562 — there are enough messages to make scrolUng nessisary 563 repeat while the mouseDown = TRUE 564 565 — oldSubtractLine gets set to mbxG_subtractLine before mbxG_sub. gets 566 — incremented. This keeps the icons from falling one position behind 567 — it's prospective message 568 569 set oldSubtractLine = mbxG_subtractLine 570 set mbxG_subtractLine = mbxG_subtractLine + 1 571 572 if mbxG_subtractLine > 0 then 573 set mbxG_subtractLine = 0 574 end if 575 576 _ SCROLL ALL FIELDS TOGETHER 577 578 scrollByLine member "MessageNumber", -1 579 scroUByLine member "MailboxTo", -1 580 scroUByLine member "MailboxSubject", -1 581 scroUByLine member "MaUboxDate", - 1 582 scroUByLine member "mime", -1 583 scroUByLine member "Messageread", -1 584 585 set numberOflcons = the lineCount of member "MailboxTo" + 40 586 set amountOfMail = the UneCount of member "MailboxTo" 587 588 — for debugging 589 — put "Unecount:" & the lineCount of member "MaUboxTo" 590 — put ' 'subtractUne: ' ' & mbxG_subtractLine 591 592 repeat with i = 40 to numberOflcons 593 594 595 — if the following 2 conditions are true, then scroll the icons 596 — i.e. if messages scroll, icons do too, if not, then neither do icons. 597 598 if mbxG_subtractLine >= - amountOfMaU + 1 and oldSubtractLine < 0 then 599 set the locV of sprite i = the loc V of sprite i + 15 600 if the locV of sprite i < 105 then 601 set the visible of sprite i = FALSE 602 else 603 set the visible of sprite i = TRUE 604 end if 605 else 606 nothing 607 end if 608 end repeat 609 610 — MOVE HIGHLIGHT WITH LINE, MOVING HIGHLIGHT 611 — OFF SCREEN WHEN LINE MOVES OFF SCREEN 612 set whichHighUght = mbxG_whichLine + mbxG_subtractLine Appendix A - Mailbox Displayer Code - Page 13 613 if whichHighlight <= 0 or whichHighlight >= 22 then 614 set the loc of sprite 11 to point (11, -20) 615 else — set the locV of highlight to scrolled message 616 set the locV of Sprite 11 to (99 + UnePosToLocV(member "MailboxTo", whichHighlight)) 617 end if 618 updateStage 619 end repeat 620 end if 621 end 622 623 on mouseUp 624 set numberOflcons = the UneCount of member "MailboxTo" + 40 625 repeat with i = 40 to numberOflcons 626 if the locV of sprite i > 550 or the locV of sprite i < 105 then 627 set the visible of sprite i = FALSE 628 else 629 set the visible of sprite i = TRUE 630 end if 631 end repeat 632 end 633 634 on mouseDown 635 global mbxG_whichLine 636 global mbxG_subtractLine 637 global mbxGJconList 638 639 640 — AS MESSAGES ARE SCROLLED, ICONS NEED TO MOVE WITH THE 641 MESSAGE, AND 642 THE MEMBERNUM 643 — OF ICON SPRITES BE ASSIGNED TO THE NEW MESSAGE THAT IS VISIBLE 644 AFTER 645 — BEING SCROLLED. 646 — ICONS NOW SCROLL... HOWEVER, ICON SPRITE POSITION IS BASED ON 647 — MBXG SUBTRACTLINE, NOT ON THE THE ACTUAL CORRESPONDING LINE 648 NUMBER 649 — OF THE MESSAGE IN THE MAILBOX WINDOW. 650 set numberOflcons Var = count(mbxGJconList) 651 set lastlconPos = getPropAt(mbxG JconList, count(mbxG JconList)) 652 if lastlconPos >= 550 then 653 — there are enough messages to make scrolling nessisary 654 repeat whUe the mouseDown = TRUE 655 scroUByLine member "MessageNumber", 1 656 scroUByLine member "MailboxTo", 1 657 scroUByLine member "MailboxSubject", 1 658 scroUByLine member "MailboxDate", 1 659 scroUByLine member "mime", 1 660 scroUByLine member "Messageread", 1 661 — GET NUMBER USED TO CORRECT FOR DISCREPANCY 662 BETWEEN 663 — THE MOUSELINE AND THE LINEPOSTOLOCV Appendix A - Mailbox Displayer Code - Page 14 664 — THE MOUSELINE GIVES LINE WITHIN FIELD TOTAL 665 — THE LINEPOSTOLOCV USES LINE OF HELD ON SCREEN 666 set mbxG_subtractLine = mbxG_subtractLine - 1 667 set numberOflcons = the lineCount of member "MailboxTo" + 40 668 set amountOfMaU = the lineCount of member "MaUboxTo" 669 — put "linecount:" & the UneCount of member "MaUboxTo" 670 — put "subtractline:" & mbxG_subtractLine 671 repeat with i = 40 to numberOflcons 672 if mbxG_subtractLine >= - amountOfMaU + 1 then 673 set the locV of sprite i = the locV of sprite i - 15 674 if the loc V of sprite i < 105 then 675 set the visible of sprite i = FALSE 676 else 677 set the visible of sprite i = TRUE 678 end if 679 else 680 nothing 681 end if 682 end repeat 683 684 if mbxG_subtractLine < - amountOfMail + 1 then 685 set mbxG_subtractLine = - amountOfMail + 1 686 end if 687 688 — MOVE HIGHLIGHT WITH LINE, MOVING HIGHLIGHT 689 — OFF SCREEN WHEN LINE MOVES OFF SCREEN 690 691 set whichHighlight = mbxG_whichLine + mbxG_subtractLine 692 if whichHighlight <= 0 or whichHighlight >= 22 then 693 set the loc of sprite 11 to point (11, -20) 694 else 695 set the locV of Sprite 11 to (99 + linePosToLocV(member 696 "MailboxTo", whichHighlight)) 697 end if 698 updateStage 699 end repeat 700 end if 701 end 702 703 704 705 on emc JndicateCheckinglnternet 706 global mbxG_red 707 global mbxG_blue 708 global mbxG_white 709 global mbxG_black 710 711 if the locH of sprite 4 > 600 then 712 set the loc of sprite 4 = point(223 , 4) 713 end if 714 — if the locH of sprite 5 > 600 then 715 — set the loc of sprite 5 = point(509, 19) 716 — end if Appendix A - Mailbox Displayer Code - Page 15 717 718 set colorNow = the forecolor of Une 1 of member the member of sprite 4 719 720 case colorNow of 721 mbxG J)lack: set colorNext = mbxG_blue — blue 722 mbxG J>lue: set colorNext = mbxG_white — pink 723 mbxG_white: set colorNext = mbxG_red — red 724 mbxG_red: set colorNext = mbxG Jilue — blue 725 end case 726 727 . set the forecolor of line 1 of member the member of sprite 4 to colorNext 728 updateStage 729 730 end emc JndicateCheckinglnternet 731 732 on emc_endIndicateCheckingInternet 733 set the loc of sprite 4 to point(800, 4) 734 set the loc of sprite 5 = point(800, 19) 735 cursor -1 736 updateStage 737 end emc_endIndicateCheckingInternet 738 739 Scripts for the close window button 740 741 on mouseDown 742 743 repeat whUe the stUlDown 744 if inside(point(the mouseH, the mouseV), the rect of sprite the cUckon) then 745 if the name of member die member of sprite the clickon = "close Window" 746 then 747 set the member of sprite the clickon = "closeWindow_down" 748 updateStage 749 end if 750 else 751 set the member of sprite the clickon = "closeWindow" 752 updateStage 753 end if 754 end repeat 755 set the member of sprite the cUckon = "closeWindow" 756 updateStage 757 758 end mouseDown 759 760 on mouseUp 761 762 — Close the window 763 if inside(point(the mouseH, the mouseV), the rect of sprite the cUckon) then 764 — these next to lines are to try and speed up 765 — the disposal of the mailbox icons on close 766 — need to check this on slower machine. 767 hideMaUIcons(the lineCount of member "MailboxTo") Appendix A - Mailbox Displayer Code - Page 16 768 go frame "stop" 769 teU the stage to emh_killComponent(0, "") 770 set success = the result 771 if success o TRUE then 772 alert("eιτor closing mailbox MIAW") 773 end if 774 end if 775 end 776 777 on hideMaUIcons numberOflcons 778 repeat with i = 40 to (40 + numberOflcons) 779 set the visible of sprite i = FALSE 780 end repeat 781 updateStage 782 end 783 784 785 — script for the open button 786 787 on mouseDown 788 789 repeat while the stillDown 790 if inside(point(the mouseH, the mouseV), the rect of sprite the cUckon) then 791 if the name of member the member of sprite the clickon = "open" then 792 set the member of sprite the cUckon = "open_down" 793 updateStage 794 end if 795 else 796 set the member of sprite the clickon = "open" 797 updateStage 798 end if 799 end repeat 800 set the member of sprite the clickon = "open" 801 updateStage 802 end mouseDown 803 804 Appendix A - Mailbox Displayer Code - Page 17 805 on mouseUp 806 807 if inside(point(the mouseH, the mouseV), the rect of sprite the cUckon) then 808 global mbxG_whichLine, mbxG_messages 809 if mbxG_whichLine = 0 then 810 alert "Select a message by clicking with your mouse." 811 exit 812 end if 813 set maildata = getAt(mbxG_messages, mbxG_whichLine) 814 tell the stage 815 emh_openMessage(maildata) 816 end tell 817 end if 818 end Appendix B - Type Updater Code - Page 1 — TYPEJJPDATER IMPLEMENTATION — Code for a component that maintains message type information for the — KidCode electronic mail cUent. — This Director MIAW makes pubUc functions avaUable for calling by other components of KidCode — pubUc functions — 1. InitializeJTypeTable — 2. InstallJType — 3. UninstallJType private functions nfor internal use only i. Write JTypetableJ le 2. ReadJTypetableJ le — 3. Read con_FUes_ToJ^AM — 4. readJconFile — 5. delete_mimetype — 6. insert_mimetype — 7. delete Jϊletype — 8. insert Uetype — Filename for permanent storage version of TYPETABLE file — typetable.txt —default directory is the currentPath directory — INITIALIZE JTYPET ABLE initiaUzes the data structures used to lookup Mime type icons, attachment filetype icons and message handler MIAWs. — The SG JTypetable is set up prior to itis use. FUe attachment information is not looked up until it is used when a message with an attached fUe is encountered. on InitializeJTypeTable global SGJTYPETABLE — super global variable shared across different MIAWS for Typetable global SG_ATTACH_TYPETABLE — - maintains info for attachment filetypes set SGJTYPETABLE = [:] - initialize property Ust for mimetype information - initialize property Ust for filetype information — this Ust will be filled only as messages with attachments are encountered set SG_ATTACH JTYPETABLE = [:] set SGJTYPETABLE = Read_TypeTable_File(the pathname & " typetable.txt") if count(SGJTYPETABLE) = 0 then - failed to read typetable file alert ("Error: Failed to read the file of MfMEtypes") return (0) end if set retVal = Read Jcon J^Ues JTo J*AM() Appendix B - Type Updater Code - Page 2 if retVal = O then alert("Error: Failed to load MIME type icons.) return (0) else return(l) end if end — InitializeJTypeTable — INSTALLJTYPE is used to install a new MIME type into the system. INSTALLJTYPE takes as input a mimetype (string), a filename of the message handling movie, an filename of the bitmap that contains the mimetype icon and, optionally, a file extension (string). The function adds the information associated with the MIME type (given by the function parameters) into the MIME type table recorded in permanent storage. Here we use the file "typetable.txt" for permanent storage of the MIME type info. on InstaU Type mimeToInstall, msgHandler JUename, icon J ename, filetype global SGJTYPETABLE — information on aU instaUed MDME types set DEFAULT CONFILE = "defaultIcon.bmp" set SGJTYPETABLE = [:] - initialize property list for mimetype information — read the existing MIME type information into RAM set SGJTYPETABLE = Read TypeTableJnle(the pathname & " typetable.txt") if count(SG JTYPETABLE) = 0 then - failed to read typetable file alert ("Error: Failed to read the file of MIMEtypes") return (0) end if — Check to see if mimetype is already installed set mimeProperties = get_rnimetype(mimeToInstaU) if mimeProperties o 0 then — mimetype is already instaUed . set redefineAlert = baMsgBox(theMessage, "KidCode", "YesNoCancel", "Question", 1) — the alert function should not save the message, only do the alert case redefineAlert of "No": return 0 "Cancel": return nl otherwise: nothing - continue end case end if — Define the new mimetype if verifyMessageHandler(msgHandlerJϊlename) = 0 then —something wrong with Appendix B - Type Updater Code - Page 3 103 program file 104 alert("Error: invalid message handler program" && msgHandlerJϊlename) 105 return(O) 106 end if 107 108 insert_msgHandler(SG_TYPETABLE, mimeToInstaU, msgHandlerJϊlename) 109 110 if verify Iconlmage(iconjϊlename) = 0 then -something wrong with icon fUe 111 alertC'Error: invalid icon file" && msgHandler Uename ". Using default icon.") 112 insert JconFUeName(SG_TYPETABLE, mimeToInstaU, DEFAULT JCONFILE) 113 else 114 insertJconFileName(SG_TYPETABLE, mimeToInstaU, iconjϊlename) 115 end if 116 117 if filetype o"" then 118 insert Jϊleytype(mimeToInstaU, filetype) 119 writeTypeToRegistry (mimeToInstaU, filetype) 120 end if 121 122 set retVal = writeJTypeTable Jile() 123 if retVal = 0 then 124 alert("Error writing typetable to file." && mimeToInstaU && "not instaUed.") 125 return(O) 126 else return(l) 127 128 end — InstaUJType 129 130 131 UNINSTALLJTYPE removes a mimetype and itis properties from both the file and 132 the global variable SGJTYPETABLE 133 134 on unlnstaUJType mimeType 135 global SGJTYPETABLE — information on aU instaUed MEVIE types 136 137 set SG TYPETABLE = [:] - initiaUze property Ust for mimetype information 138 139 — read the existing MIME type information into RAM 140 set SGJTYPETABLE = ReadJTypeTableJnle(fhe pathname & " typetable.txt") 141 142 if count(SGJTYPETABLE) = 0 then - failed to read typetable file 143 alert ("Error: Failed to read the file of MIMEtypes") 144 return (0) 145 end if 146 147 delete_mimetype(mimeType) 148 149 — write the revised typetable to the file 150 set retVal = writeJTypeTable J^UeO 151 if retVal = 0 then 152 alertC'Error." && mimeToInstaU && "could not be uninstalled. Typetable file write 153 error.") Appendix B - Type Updater Code - Page 4 154 return(O) 155 else return(l) 156 157 end unlnstallJType 158 159 — WRITE TYPETABLEJ^LE writes the information in SGJTYPETABLE to the 160 typetable file on disk. This file stores properties associated with each mimetype. 161 - — SGJTYPETABLE is a property list that contains a list of mimetypes. 162 163 on Write JTypetableJule 164 global SGJTYPETABLE — super global variable shared across different MIAWS 165 set fileName = the pathname & "typetable.txt" 166 set bkupFUeName = the pathname & "typetable.bak" 167 168 if count( SGJTYPETABLE) = 0 then - no mimetypes defined 169 alertC'Error. No mimetype data to write.) 170 return(O) 171 end if 172 173 — create backup for typetable file 174 copyFUe(filename, bkFUeName) 175 176 - start up Fileio Xtra 177 set mFUe = new(xtra "fileio") 178 179 set retVal = deleteFile(mFile, filename) - delete old version before rewriting 180 set retVal = createFile(mFUe, filename) 181 if retVal = 0 then 182 alertC'Error updating typetable file.") 183 renameFile(bkFileName, filename) 184 return(O) 185 end if 186 187 openFile(mFile, fileName, 2) - open for write access 188 setPosition(mFile, 0) 189 190 — write the data into the file 191 set i= l 192 set mimeType = getAt(SG JTYPETABLE, i) 193 repeat whUe mimeType o 0 194 set dataToWrite = mimetype 195 put " " & get Uetype(mimetype) into dataToWrite 196 put " " & getJconFUeName(mimetype) into dataToWrite 197 put " " & getJvIsgHandler(mimetype) into dataToWrite 198 writeline(mFile, dataToWrite) 199 set i= i+l 200 set mimeType = getAt(SG_TYPETABLE, i) 201 end repeat 202 203 closeFUe(mFUe) 204 set retVal = deleteFUe(mFUe, bkFileName) - delete backup file Appendix B - Type Updater Code - Page 5 205 return(O) 206 end WriteJTypeTable Jnle 207 — READJTYPETABLEJTLE reads the typetable file 208 — and creates a data structure in memory, SGJTYPETABLE 209 - — SGJTYPETABLE is a property list that contains a Ust of mimetypes 210 211 When the function returns, the global property list data structure, SGJTYPETABLE, 212 contains an entry for each mimetype. Along with the pathName for the message handling 213 movie and the IconFUe. Later the cast member number for the icon in RAM wiU be added 214 to the datastructure. For now these are all set to 0. This data structure looks like, 215 [ "text plain": ["txt", 0, "C:\KidCode\text.gif", "C:\KidCode\text.dxr"], "x- 216 application/grid": ["", 0, "C:\KidCode\grid.gif", "C:\KidCode\grid.dxr"]] 217 218 on Read TypeTable _Fύe 219 global SGJTYPETABLE — super global variable shared across different MIAWS 220 set fileName = the pathname & "typetable.txt" 221 222 set SGJTYPETABLE = [:] - initialize property Ust for mimetypes 223 224 - start up FUeio Xtra 225 set mFUe = new(xtra "fileio") 226 openFile(mFile, fileName, 1) — open for read only access 227 set status = status(mFile) 228 229 if status o 0 then 230 alertC'Error. Could not open mimetype table: " & error(mFile, status)) 231 closeFUe(mFile) ~ just to be safe 232 return FALSE 233 end if 234 235 setPosition(mFile, 0) 236 237 - Lingo canit read one Une at a time so simulate this by reading the entire file into the 238 string, str 239 set str = readFile(mFile) 240 241 set nTypes = the number of lines in str 242 repeat with j = 1 to nTypes 243 set mimetype = word 1 of line j 244 msert_mimetype(rnimetype) 245 insert Jϊletype(mimetype, word 2 of line j) 246 insert JconFUeName(mimetype, word 3 of line j) 247 insert_rnsgHandler(mimetype, word 4 of line j) 248 end repeat 249 250 closeFile(mFile) 251 252 end Read JTypeTable Jnle 253 254 255 on ReadJconJ=ΗesJToJlAM Appendix B - Type Updater Code - Page 6 256 global SGJTYPETABLE 257 global SG_DEFAULTJCON_PTR = 1000 258 259 if count( SGJTYPETABLE) = 0 then - no mimetypes defined 260 alertC'Error. No mimetype data. Canit load icons.) 261 return(O) 262 end if 263 264 — load the default icon 265 importFileInto(member SG_DEFAULT_ICON_PTR, the pathname & "defaulticon.gif) 266 267 — cycle through the mimetypes loading icons 268 set castNum = SG_DEFAULTJCON_PTR + 1 -first icon immediately follows the 269 default 270 set i= 1 271 set mimeType = getAt(SG_TYPETABLE, i) 272 repeat while mimeType o 0 273 set iconFile = getJconFileName(SG_TYPETABLE, mimetype) 274 if icon ="" then — icon not defined use default 275 set iconPtr = SG_DEFAULT_ICON_PTR 276 else 277 set iconPtr = read_IconFile(iconFile, castNum ) 278 if iconPtr > 0 then 279 set castNum = castNum + 1 280 else set iconPtr = SG_DEFAULTJCON_PTR 281 end if 282 283 insertJconPtr(mimetype, iconPtr) 284 set i= i+1 285 set mimeType = getAt(SG_TYPETABLE, i) 286 end repeat 287 288 return(l) 289 290 end Read Jcon Jules _To AM 291 292 293 294 — READ JCONFTLE loads a single icon bitmap into RAM 295 on readJconFile filename, castMemberNum 296 set retVal = importFileInto(member castNum, iconFile) 297 return (retVal) 298 end readJconFile 299 — Data Access Functions for MIMETYPE info 300 — Data is stored in the property list SGJTYPETABLE with the following structure: 301 — mimetype: properties 302 — where mimetype is a string, e.g. "text/plain" 303 — and properties is a list with the following elements: 304 — [ filetype, iconPtr, iconFilename, msgHandlerJnleName 305 — - e.g. SGJTYPETABLE = 306 — [ "text/plain": ["txt", 0, "C:\KidCode\tex gif", "C:\KidCode\text.dxr"], Appendix B - Type Updater Code - Page 7 307 — - "x-application/grid": ["", 0, "C:\KidCode\grid.gif, "C:\KidCode\grid.dxr"]] 308 309 on get_rrtimetype mimetype 310 global SGJTYPETABLE 311 retum( getProp(SG_TYPETABLE, mimetype) ) 312 end 313 314 on get J letype mimetype 315 global SGJTYPETABLE 316 set theProperties = getProp(SG_TYPETABLE, mimetype) 317 return( get A t( theProperties , 1 ) ) 318 end 319 320 on getJconPtr mimetype 321 global SGJTYPETABLE 322 set theProperties = getProp(SG_TYPETABLE, mimetype) 323 return( getAt( theProperties, 2) ) 324 end 325 326 on get JconFileName mimetype 327 global SGJTYPETABLE 328 set theProperties = getProp(SG_TYPETABLE, mimetype) 329 return( getAt( theProperties, 3) ) 330 end 331 332 on get_msgHandler mimetype 333 global SGJTYPETABLE 334 set theProperties = getProp(SG_TYPETABLE, mimetype) 335 return( getAt( theProperties, 4) ) 336 end 337 338 on insert_mimetype mimetype 339 global SGJTYPETABLE 340 addProp(SG_TYPETABLE, mimetype) 341 end 342 343 on insert_fιletype mimetype, filetype 344 global SGJTYPETABLE 345 set theProperties = getProp(SG_TYPETABLE, mimetype) 346 add(theProperties, filetype) 347 setProp(SG_TYPETABLE, mimetype, theProperties) 348 end 349 350 on insertJconPtr mimetype, iconPtr 351 global SGJTYPETABLE 352 set theProperties = getProp(SG_TYPETABLE, mimetype) 353 add(theProperties, iconPtr) 354 setProp(SG_TYPETABLE, mimetype, theProperties) 355 end 356 357 on insertJconFileName mimetype, iconFilename Appendix B - Type Updater Code - Page 8 358 global SGJTYPETABLE 359 set theProperties = getProp(SG_TYPETABLE, mimetype) 360 add(theProperties, iconFilename) 361 setProp(SG JTYPETABLE, mimetype, theProperties) 362 end 363 364 on insert_msgHandler mimetype 365 global SGJTYPETABLE 366 set theProperties = getProp(SG_TYPETABLE, mimetype) 367 add(theProperties, msgHandler) 368 setProp(SG_TYPETABLE, mimetype, theProperties) 369 end 370 371 372 on delete_rnimetype mimetype 373 global SGJTYPETABLE 374 deleteProp(SG_TYPETABLE, mimetype) 375 end 376 377 on deletejiletype mimetype 378 global SGJTYPETABLE 379 set properties = getProp(SG_TYPETABLE, mimetype) 380 setAt(properties, 1,"") 381 setProp(SG JTYPETABLE, mimetype, properties) 382 end 383 384 on delete Jcon mimetype 385 global SGJTYPETABLE 386 set properties = getProp(SG_TYPETABLE, mimetype) 387 setAt(properties, 2, 0) 388 setProp(SG_TYPETABLE, mimetype, properties) 389 end 390 391 on delete JconFileName mimetype 392 global SGJTYPETABLE 393 set properties = getProp(SG_TYPETABLE, rnimetype) 394 setAt(properties, 3,"") 395 setProp(SG_TYPETABLE, mimetype, properties) 396 end 397 398 on delete_msgHandler mimetype 399 global SGJTYPETABLE 400 set properties = getProp(SG_TYPETABLE, mimetype) 401 setAt(properties, 4,"") 402 setProp(SG_TYPETABLE, mimetype, properties) 403 end

Claims: Claims: 1. Electronic mail client software for use with a display device, comprising: a) mailbox displayer means for displaying the contents of a mailbox as a scrollable list on the display device wherein each item of mail is listed with a plurality of properties, said properties selected from the group consisting of subject, sender's name, and date sent; b) association means for associating a plurality of mime types with a plurality of icon images, wherein said mailbox displayer means includes means for determining the mime type of at least some items of mail in the mailbox, means for reading said association means, and means for displaying in the scrollable list an icon image as a property associated with each of said at least some items of mail, said icon image for each of said at least some items of mail being selected from said association means according to the mime type for each of said at least some items of mail. 2. Electronic mail client software according to claim 1, further comprising: c) type updater means for updating said association means to include additional mime types and additional icon images. 3. Electronic mail client software according to claim 1, further comprising: c) a plurality of icon images, each having a filename, wherein said association means is a data structure associating each of at least some mime types with the filenames of an icon image. 4. Electronic mail client software according to claim 1, wherein: said association means includes means for associating mime types with programs, and wherein some mimetypes are not associated with icon images but are associated with programs. 5. Electronic mail chent software according to claim 2, wherein: said type updater means is responsive to user input. 6. Electronic mail client software according to claim 3, wherein: at least some of said plurality of images are scalable. 7. Electronic mail chent software according to claim 1, wherein: said electronic mail chent software is designed to be used with an operating system which maintains a registry of icons, and said association means associates at least some mime types with icons selected from said registry of icons. 8. Electronic mail client software according to claim 1, further comprising: c) icon recovery means for reading graphical icon information contained in an email or email attachment, wherein said association means associates a mime type with an icon recovered by said icon recovery means if no other icon is found. 9. Electronic mail chent software according to claim 2, wherein: said type updater means is manually operable by a user of said electronic mail client software. 10. Electronic mail chent software according to claim 2, wherein: said type updater means automatically installs a new icon image according to an event selected from the group consisting of a new application or component is installed which is capable of authoring/reading a new mime type, a new mime type is encountered in a received mail message, and a regularly scheduled event causes said type updater to check a server for new icons. 11. A method of displaying a list of the contents of an electronic mail box on a display device, comprising: a) displaying the contents of the mailbox as a scrollable hst on the display device wherein each item of mail is listed with a plurality of properties, said properties selected from the group consisting of subject, sender's name, and date sent; b) determining the mime type of at least some items of mail in the mailbox; c) displaying in the scrollable list an icon image as a property associated with each of said at least some items of mail, said icon image for each of said at least some items of mail being selected according to the mime type for each of said at least some items of mail. 12. A method according to claim 11, further comprising: d) associating mime types with programs; e) executing a program associated with a mime type when a mail item of the mime type is opened. 13. A method according to claim 11, wherein: at least some of said icon images are scalable. 14. A method according to claim 11, wherein: said step of displaying includes selecting at least some icons from a central registry of icons. 15. A method according to claim 11, wherein: said step of displaying includes reading graphical icon information contained in an email or email attachment. 16. A method according to claim 11, further comprising: d) maintaining a store of graphical icons for use when performing said step of displaying. 17. A method according to claim 16, further comprising: e) automatically instalhng a new icon image in said store of graphical icons in response to an event selected from the group consisting of when a new apphcation or component is installed which is capable of authoring/reading a new mime type, when a new mime type is encountered in a received mail message, and when a regularly scheduled event causes said type updater to check a server for new icons.

Inventors: BAKER MICHELLE, BAKER, MICHELLE
Applicants: INTELLINET INC, INTELLINET, INC.
Application year: 2001
Main classification: G06F13
IPC codes: G06F13, G06Q10