Can Palm add the following two glue functions:

UInt16 FrmGlueGetObjectIndexFromPtr (const FormType* formP, void* objP)
{
        if (gRomVersion >= romVersion40)
                return FrmGetObjectIndexFromPtr (formP, objP);
        else
        {
                UInt16 i;

                for (i = 0; i < formP->numObjects; i++)
                {
                        if (formP->objects[i].object.ptr == objP)
                                return (i);
                }

                ErrNonFatalDisplay("Obj ptr not in form");

                return (frmInvalidObjectId);
        }
}

and

Boolean MenuGlueIsVisible (MenuBarPtr menuP)
{
        return (menuP->attr.visible);
}

These are functions that, in the Palm OS Reference tell you to access
internals of structs but you can't now.

Cheers,
trv
-- 
Trevor Menagh      | Software Engineer
[EMAIL PROTECTED]  | iambic, Inc.
(408) 367-1600 x20 | Advancing your handheld experience
www.trevreport.org | www.iambic.com


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