Hi Laurens,

"Laurens" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Hi,
>
>
> Does sending frmUpdateEvents to a form other than the active form (using
> FrmUpdateForm) only work just before you close the active form?
>
> Let me explain. In my app I implement custom categorization. I display my
> "Edit Categories..." dialog on top of the main form (which shows the
> category popup trigger). Now whenever the user adds/renames/deletes a
> category in the "Edit Categories..." dialog I want to post an
frmUpdateEvent
> to the main form, so that it can update the category popup trigger and
list.
> This is a clean approach.
>
> Now this only seems to work when I post the event just prior to closing
the
> dialog.  Example:
>
> FrmUpdateEvent(frmMain, CATEGORY_RENAMED); // This works
> FrmReturnToForm(0);
I can't believe, taht this works, I guess it must be:
FrmUpdateForm(...
Right?

>
> However, when I call FrmUpdateEvent just after the user has edited the
> category (while the dialog is still displayed), the frmUpdateEvent never
> reaches my main form's event handler and seems to get ignored altogether.

I had that problem too, but it don't remember exactly. I think, the problem
is, that your MainForm event handler is'nt called. Even if you use
FrmUpdateForm(frmMain..., the event is send the event handler of your active
form. I worked around it by explicit calling my MainFormHandler from the
event handler of my active form:

EventType event;


MemSet(&event, sizeof(event), 0); //event kpl. ausnullen

event.eType = frmUpdateEvent;

event.data.frmUpdate.formID = formID;

event.data.frmUpdate.updateCode = updateCode;

MainFormHandleEvent(&event);



Hope this helps

Horst


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

Reply via email to