The following code snippet makes the Palm OS 5 simulator crash when
performing a search:
case sysAppLaunchCmdFind:
if (PrefGetAppPreferences(appFileCreator, appPrefID, &tempPrefs,
&prefsSize, true) != noPreferenceFound)
{
if (tempPrefs.includeInGlobalFind) SearchDB ((FindParamsPtr)cmdPBP);
}
break;
Where as the following works like a charm:
case sysAppLaunchCmdFind:
SearchDB ((FindParamsPtr)cmdPBP);
tempPrefs and prefsSize are defined as local variables, not globals.
This code works fine with Palm OS 4.x and earlier.
The offender clearly is PrefGetAppPreferences(...)
Question: is it forbidden to use PrefGetAppPreferences(...) in a
sysAppLaunchCmdFind context is OS 5 ?
MT
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/