Jamie,

>      EvtCopyEvent(event,&eNewEvent);
>        eNewEvent.eType = fldChangedEvent;
>        eNewEvent.data.fldChanged.fieldID = EditWordWordField;
>        eNewEvent.data.fldChanged.pField = FrmGetObjectPtr(frm,
>  FrmGetObjectIndex(frm,EditWordWordField));
>        EvtAddEventToQueue(&eNewEvent);

An important point about setting up event records - you should ensure 
that all unused fields are null, for future compatibility. The same 
holds true for any Palm OS data structure that you create/initialize 
and pass to OS routines.

This means that EvtCopyEvent is really only safe to use when you're 
going to be posting another event of the _same_ type.

Since you're changing the event type from a keyDown to a fldChanged, 
the safe thing to do is:

        MemSet(&eNewEvent, sizeof(EventType), 0);
        eNewEvent.eType = fldChangedEvent;
        <fill in rest of the fields>

You could save some code by using EvtCopyEvent and then doing a 
MemSet on just the union .data field in the structure, but it's 
probably not worth it.

-- Ken
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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

Reply via email to