In article <35308@palm-dev-forum>, "Alan Ingleby"
<[EMAIL PROTECTED]> wrote:
> I need to request a specific time (eg: 12:00am.) But the system function
> SelectOneTime() is only available for OS3.1 and up. I'm trying to keep
> compatibility with OS 3.0 and up.
>
> Is there a similar call for OS3.0, or is there a library I can include with
> my program to supply the newer OS functions for use on older OSs?
I used "SelectTimeV33" in "DST Panel" for this purpose. The user interface
is not very nice on old systems and the resolution is only 5 minutes, but
at least it works in some way. Nobody complained about this until now, but
maybe nobody is using it on an old system. You can get the full source
code (GPL) at
<http://www.geocities.com/SiliconValley/Cable/5206/dstpanel.htm>. (Note:
*hour and *min point to UInt8 type variables holding the resulting time.)
FtrGet(sysFtrCreator, sysFtrNumROMVersion, &sysRomVersion);
if (sysRomVersion < sysMakeROMVersion(3,1,0,sysROMStageRelease,0)) {
time.hours = *hour;
time.minutes = *min;
dummy = time;
if (SelectTimeV33(&time, &dummy, false, title, 0)) {
if (*(Int16*)&time != noTime) {
*hour = time.hours;
*min = time.minutes;
prefsChanged = true;
}
}
} else {
hour16 = *hour; // implicit type cast
min16 = *min;
if (SelectOneTime(&hour16, &min16, title)) {
*hour = hour16; // implicit type cast
*min = min16;
prefsChanged = true;
}
}
--
Remo Hofer <[EMAIL PROTECTED]>
http://www.geocities.com/SiliconValley/Cable/5206/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/