Hi,

Is there a way to determine the list id that a popup trigger control uses
without accessing a struct members?

In other words make the following code ARM portable:

Int16 FindListId(Int16 triggerID)
{
  Int16 listID = -1;
  Int16 numObjects = FrmGetNumberOfObjects(formP);

  FormObjListType *frmObjs = formP->objects;
  for (Int16 i = 0; i < numObjects; i++)
  {
   if (FrmGetObjectType(formP, i) == frmPopupObj)
   {
    const FormPopupType *popup = frmObjs[i].object.popup;

    if (popup->controlID == triggerID)
    {
     listID = popup->listID;
     break;
    }
   }
  }

  return listID;
}

Regards,
Chris




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

Reply via email to