I have a form that includes a trigger and list used to select a Category.
This trigger and list are NOT in the "title bar" section of the form.

I've noticed that after calling CategorySelect(), the form is not redrawing
correctly.  That is, there are vestiges of the list on the form.  I thought
that this meant that I should draw the form again (even though I've never
seen an example do this), but, oddly, FrmDrawForm() tries to access memory
that it doesn't own, and crashes.  I thought I should perhaps catch and
handle frmUpdateEvent, but that event doesn't come through.

I'm sure I'm missing something simple, but I just don't see it by looking at
example code and reading the documentation.  What do I need to do to my
resources or after calling CategorySelect to cause my form to be correctly
drawn?

Thanks in advance.

Jeff

--------

static void EditFormDoCategorySelect(    // no return value
    void)                                                           // no
parameters

    {
    static Char CategoryName[dmCategoryLength];
    FormType * pForm = NULL;

    ASSERT(gDbRef != 0);

    pForm = FrmGetActiveForm();
    ASSERT(pForm != NULL);

    // Get the text associated with the current category, then
    // invoke the category selection function to manage the
    // categories.

    CategoryGetName(
        gDbRef,                       // [in] open database
        gSelectedCategory,    // [in] category index
        CategoryName);         // [out] string for this category

    CategorySelect(
        gDbRef,                              // [in] open database
        pForm,                                // [in] form containing the
list
        EditCategoryPopTrigger,  // [in] id of trigger
        EditCategoryList,              // [in] id of the popup list
        false,                                   // [in] true = add All to
list
        &gSelectedCategory,        // [in/out] selected category
        CategoryName,                  // [in/out] name of selected category
        2,                                         // [in] number of
uneditable
        categoryDefaultEditCategoryString);

    // When you look at this on a debug ROM, the screen may not
    // be repainted correctly.  That would seem to indicate that it is
    // necessary to redraw the form.  However, when FrmDrawForm(pForm)
    // is called here, the device crashes.
    //
    // It paints correctly on the Visor, but not the Palm V.
    }




-- 
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