Start CodeWarrior, open a new project, 3.5 stationary, C++
Modify AppStart() as follows:
static Err AppStart(void)
{
StarterPreferenceType prefs;
UInt16 prefsSize;
// Read the saved preferences / saved-state information.
prefsSize = sizeof(StarterPreferenceType);
if (PrefGetAppPreferences(appFileCreator, appPrefID, &prefs, &prefsSize, true)
!=
noPreferenceFound)
{
}
UInt8 *foo = new UInt8[128*1024]; // ADD THIS LINE, SET BREAKPOINT HERE
return errNone; // SET BREAKPOINT HERE
}
Ok, now run it.
you hit the first breakpoint, great, no problem. Step over that line. Ooops!
You never hit
the second breakpoint! What happened?
(yes, we ran out of memory, but I'm trying to illustrate a larger point here)
No warnings?? No errors?? Nothing, just POW, end of program, welcome to the
prefs window,
thanks for playing.
Does this bother anybody else?
--
Adam Wozniak Senior Software Design Engineer
Surveyor Corporation
[EMAIL PROTECTED] 4548 Broad Street
[EMAIL PROTECTED] San Luis Obispo, CA 93401
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/