Here is my AppStart():
Note: the gmlUserDB and gmlChaptersDB are included in a header file:
// Mobile Learning's database reference
static DmOpenRef gmlUserDB;
static DmOpenRef gmlChaptersDB;
--------------------------------
static Err AppStart(void)
{
MLearnPreferenceType prefs;
UInt16 prefsSize;
UInt16 mode;
Err err = errNone;
prefsSize = sizeof(MLearnPreferenceType);
if ( PrefGetAppPreferences(appFileCreator, appPrefID, &prefs,
&prefsSize, true) != noPreferenceFound )
{
gfirstTime = prefs.firstTime;
gdefaultUser = prefs.defaultUser;
}
else
{
gfirstTime = true;
gdefaultUser = 0;
}
mode = dmModeReadWrite;
// Find Mobile Learning's database. If it doesn't exist, create it.
err = MLGetUserDatabase(&gmlUserDB, mode);
err = MLGetChaptersDatabase(&gmlChaptersDB, mode);
if (err)
return err;
// INITIALIZE THE HIGH-LEVEL HTTP NETWORKING LIBRARY
ghNetGlobals = NULL;
err = AppNetStart(TimeoutInSecs(20), &ghNetGlobals);
if (err || ghNetGlobals == NULL) {
// Can't do networking on this device.
// We will use 'if (ghNetGlobals == NULL)' as a test for
// whether or not we can use network comms
}
if ( gfirstTime)
{
FrmGotoForm(WelcomeForm);
}
else
FrmGotoForm(CoursesForm);
//return errNone;
return err;
}
-------------------
To be frank, I havent got the hang of the debugger? I just know how to step
into codes, but I dont know how to get the GUI and interface working in the
debugger mode, for example to click the home button or a button on a form to
see what happends??
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/