hi,

On clicking a button or a graphic button the event fired is ctlSelectEvent.
I am generating all these controls dynamically. 

Now, on ctlSelectEvent I say:

    id = event->data.ctlSelect.controlID;
    control = (ControlType*) GetObjectPtr(form,id);

    // get label on the button
    cLabel = CtlGetLabel(control);

    if(*cLabel == '\0')   // this is were it gives problem
        // graphic controls do not have any label values
        HandleGraphicControlEvents(form,id);
    else
        HandleControlEvent(form,id);

/**********************/
void HandleGraphicControlEvents(FormPtr form, UInt16 id){

    graphicCtl = (GraphicControlType*) GetObjectPtr(form,id);
    // perform required actions
}

When I compare *cLabel with null, I get application crashes and gives
some junk value as message.

I tried with StrCompare() also but is didn't work. cLabel value that
is displayed in the debugger is "".

where could be the actual problem? Am I handling events properly?

Anuradha



__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com


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

Reply via email to