> I'm developing an application that using categories implementation and I
am
> facing some problems. Please help me. The problems are as below:
>      1. How to initialize the categories' list? So that, the 'Unfiled' is
> always at the List.

Use CategoryInitialize() to initialize your list of categories.  You'll
create a resource that contains 16 items (some of which can be empty) and
load this into your database.  You'll need to know how to get a pointer to
the application information block (type DB_APP_INFO) in your database.

>      2. For first edited category, why it is not display at the Edit
> Categories dialog box?

Use CategorySelect() to select a category.  One parameter to this function
is whether to add the "edit" choice, and another parameter specifies how
many of the categories are not editable.  Thus, if your first category is
"Unfiled", you can specify that it cannot be edited by providing 1 as the
number of uneditable categories.

If you just want to edit directly, use CategoryEdit().  Again, you specify
how many categories are not editable.  If you want to allow the user to
change all of the categories, specify 0 as the count.

If you have access to the source code for the built-in applications (such as
Address Book), you can look at that source code for an example of how to
initialize a database (including adding categories) and how to edit
categories.

If you don't have access to that source code, then invest in a good Palm
programming book.  I suspect that all of these books would include an
example of using categories.  I like "Palm OS Programming Bible" and "Palm
OS Programming for Dummies".



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to