The BeOS comes with a nifty little contact manager called People (in
Data about each person is stored as attributes on the Person file. Using attributes to store contact information means you can take advantage of the usual system facilities to view, sort, and search on attributes, which lets the People application be pretty small (only 45K), while still giving you a great deal of functionality in a contact manager.
After you've played around with People a bit, though, a natural question comes to you: Can I add more fields to my contact manager, or am I stuck with the ones that Be decided to give me? The answer is that of course you can add extra fields, in the form of attributes, to your heart's content -- this is the BeOS we're talking about!
To do this, we're going to use a preferences application we first saw in
Tip 33, More About MIME, the FileTypes
After selecting the application/Person item from the top list, you'll see the list of attributes which the BeOS defines for that file type, in the Extra Attributes section:
In the case of Person files, there's quite a lot of them (and I added a couple more just before this screen shot -- don't be surprised if you don't see IP Address in your own FileTypes application!). The good news is that you can add even more, using the Add... button, which brings up a simple dialog to let you define the attribute's details:
Here we're adding a mobile phone number. To do so, we have defined both a display name ("Attribute name") and an internal name, the type of data to be stored in the attribute, and a variety of other settings which affect how the Tracker treats files of this type.
You can add other attributes to Person files to customize the BeOS' contact manager to suit your own custom needs. And you can add additional attributes to other system-defined files, too, though you should be careful about doing so. At the very least, examine the default attributes first (just double-click on them in the Extra Attributes list) to see what kinds of conventions are used (for example, all Person attributes start with "META:").
Unfortunately, the current version of the People application does not notice extra attributes you define, so you cannot edit them using the People application. However, using the technique in Tip 6, Attributes for E-mail Folders, you can display these attributes in the Tracker, and edit them there.
Cool, n'est-ce pas?
Copyright © 1999 by Be, Inc. All rights reserved. Legal information (includes icon usage info).
Comments, questions, or confessions about our site? Please write the Webmaster.