You have to initalize the variable, just like its warning you. You have to
make the SelectDayType variable contain the current date. Also, I feel
selectDayBy is probably a bad variable name since it is very similar to
one of the options you pass to SelectDay. Here's some example code:

DateTimeType date;
SWord month, day, year;
TimSecondsToDateTime(TimGetSeconds(), &date);
month = date.month;
day = date.day;
year = date.year;
SelectDay(selectDayByDay, &month, &day, &year, "Select Date");

The string as the last parameter may have to be locked first.

On Fri, 16 Jul 1999, Joe Jenkins 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; }
> 
> If anyone has any input on using this it would be very appreciate...I have
> looked all over and read alot but no luck yet....
> 
> Thanks!
> 
> 
> 

Reply via email to