At 06:47 PM 9/4/2002 +0000, you wrote:
>Hello,
>
>I have been reading "Advanced Palm Programmimg" by Steve Mann, page 79.
>where it states the Popup Handling,,Im kind of confused, and when I tried 
>running the code I get several error from this case statement;
>// Popup triggers
>
>                         case ctlEnterEvent:
>                                 ctlP = GetObjectPtr ( 
> eventP->data.ctlSelect.controlID );
>                                 if ( ctlP->style == popupTriggerCtl )
>                                 {
>                                         HandlePopup ( 
> eventP->data.ctlSelect.controlID );
>                                         handled = true;
>                                         DisplayNumber ();
>                                 }
>                                 break;
>
>the errors being;
>Error   : illegal use of incomplete struct/union/class 'struct ControlType'
>FloatFld.c line 718   if ( ctlP->style == popupTriggerCtl )

Steve's code is directly accessing the style field of the control.  To do 
this correctly with recent versions of the Palm OS SDK, you need to use the 
glue code function CtlGlueGetControlStyle to access the field.  The rest of 
the errors are due to the compiler failing to recover from this error.

However, if you're doing your own forms, then you should be able to tell 
what controls are popup triggers by the ID, so you can avoid the glue code 
call, and just compare the controlID against the known triggers on your form.

-- 
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com


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

Reply via email to