At 10:35 AM 7/16/99 -0600, you wrote:
>What is the proper way to handle SelectDay issues?  I had this working
>where you would tap on control and it would bring up a date selection
>dialog...now it no longer works and gives me errors...also i get linker
>warnings when compiling now:
>
>Warning : variable 'selectDayBy' is not initialized before being used
>pocket scan.c line 688    SelectDayType selectDayBy;
>
>this is how i am using it now:
>
>       SelectDayType selectDayBy;
>
>       if (SelectDay(selectDayBy, &pTimeDate.month ,&pTimeDate.day,
>&pTimeDate.year, "Pick Date:")) { // blah blah; }

While the documentation on this function isn't the best (come on Palm, can
we please have these types & what they mean actually documented somewhere
apart from the .h files?)

You may find it useful to actually pass a variable into the function,
instead of the unknown value you currently have in selectDayBy.  This is
what "variable 'selectDayBy' is not initialized" means.

A variable of SelectDayType should hold one the following values:

        selectDayByDay,         // return d/m/y
        selectDayByWeek,                // return d/m/y with d as same day of the week
        selectDayByMonth                // return d/m/y with d as same day of the month

Any other value (say, some random garbage the compiler put in there) could
cause problems, such as ... the control not working properly or at all.

Seeing as how the value is a throw away value anyway (you're not going to
be using it elsewhere), you can just do something like:

if (SelectDay(selectDayByWeek, &pTimeDate.month, &pTimeDate.day,
&pTimeDate.year, "Guess What This Does: "))
{
    1/0;
}


Reply via email to