spacer graphic


Be Developers:
Put your banner here!

spacer graphic x10icon graphic [Bar]

Adding More Attributes to People


The BeOS comes with a nifty little contact manager called People (in /apps), which gives you an easy way to store information about people you know, using the BeOS' Person files. Person files are a system-defined file type, creating a standard way to store information about individuals in the BeOS.

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 application (/preferences/FileTypes), which gives you a view on your system file types:

FileTypes panel

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:

FileTypes Extra Attributes

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:

Adding Extra Attributes

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.