I have done things like that without problems.  Another way to do it, which
keeps all the main form modifications in one place, is like this:

 FrmReturnToForm(m_ParentDialogID);
 FrmUpdateForm(m_ParentDialogID, UPDATEWITHNEWFILTER);

and then in the main form:

    case frmUpdateEvent:
            if (UPDATEWITHNEWSORT == event->data.frmUpdate.updateCode)
                SortTimeRecords(TimeLogDB);
            else if (UPDATEWITHNEWFILTER ==
event->data.frmUpdate.updateCode)
            {
                if (CPreferences::IsFilterEnabled())
                {
                 CurrentRecord = noRecordSelected;
                    UnselectAll();
                    CFilter::FilterRecords(TimeLogDB);
                }
                CTotal::UpdateTotal(TimeLogDB);
            }

            UpdateMainForm();
             handled =  TRUE;
             break;




"Mike Davis" <[EMAIL PROTECTED]> wrote in message
news:7776@palm-dev-forum...
>
> I have a popup form that comes up over the main form.
> I want to get a value from a list on the popup form
> and write it back to a field on the main form.
>
> This works but I don't know about timing or if there
> is some trap in doing what I want, this way.  Can I
> take a value from a list then execute a FrmReturnToForm
> and immediately begin accessing the frmMain objects?
>
> case lstSelectEvent:
> if (event->data.lstSelect.listID == lstRegNum) {
> listP1 = GetObjectPtr(lstReg);
> // do something here to get string from list
> FrmReturnToForm(frmMain);
> fldP = GetObjectPtr(fldXReg);  // fldXReg is on frmMain
> // fldP points to field on frmMain
> // regP is a local char* that receives string from lstReg
> FldInsert(fldP, regP, StrLen(regP));
>    handled = 1;
> break;
> }
> --
> -----------------------------------------------------------------
> Discussion Group:        http://www.halcyon.com/ipscone/wwwboard/
>
> Protect your constitutional rights. Your favorite one may be next!
> -----------------------------------------------------------------
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to