Question: do you need them holding their value between different calls
to your function? That's what the keyword static by variable
declarations is for.
Henk
Andy Black wrote:
Hi,
I have kind of a basic C question I guess. I have the following function:
static Boolean PreferencesFormHandleEvent(EventPtr eventP)
{
Boolean handled = false;
FormPtr frmP;
ControlPtr controlP;
ListPtr listP;
double dose;
Char text[5];
switch (eventP->eType)
{
case frmOpenEvent:
//code removed
break;
case popSelectEvent:
if (eventP->data.ctlSelect.controlID ==
PreferencesDrugPopTrigger)
{
//code removed
}
break;
case ctlSelectEvent:
switch (eventP->data.ctlSelect.controlID)
{
//code removed
}
break;
default:
break;
}
return handled;
}
When I drop into debug my code I find that the "dose" and "text" are not showing up as
variables. All the others in the code above do. My code works fine other than the portions that rely on those
two variables. I tried initializing them manually (text = "test" and dose =1) and that didn't make
a difference.
I know it is something rather simple I am missing here. Any help is appreciated.
Thanks,
Andy
--
-------------------------------------------------------------------------
Henk Jonas
Palm OS Â certified developer
[EMAIL PROTECTED] www.metaviewsoft.de
-------------------------------------------------------------------------
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/