hi hi!
i asked this question quite long ago in the POL forum and none seem to reply to
it.. i am testing my luck here hoping some 1 could reply...
i want to open a class and use it's functions in the
sysAppLaunchCmdDisplayAlarm area... i get this type of error from pose
"application tried to write to address that is neither on RAM or ROM" after the
alarm triggered...
the class that i was calling was just a simple class residing on a different
file DataTest.h/cpp
class CDataTest
{
public:
testFunction();
private:
CString m_strTest;
}
and in my CDataTestApp.cpp i have this
#include "Common.h"
#include "DataTestApp.h"
#include "DataTest.h"
.
.
.
Err CDataTestApp::InitInstance()
{
if (m_wLaunchFlags & sysAppLaunchFlagNewGlobals)
{
}
switch (m_wCommand)
{
case sysAppLaunchCmdAlarmTriggered:
SndPlaySystemSound(sndAlarm);
break;
case sysAppLaunchCmdDisplayAlarm:
check();
break;
}
return CPalmStApp::InitInstance();
}
.
.
.
void CDataTestApp::check()
{
DmSearchStateType stateInfo;
UInt16 wCardNo;
LocalID liDbID;
if
(DmGetNextDatabaseByTypeCreator(true,&stateInfo,'DATA','mApp',false,&wCardNo,&liDbID)
== 0)
{
m_Database.Open(wCardNo, liDbID, dmModeReadWrite);
m_Database.QuickSort(SortDataTestData, 0);
MemHandle h;
UInt16 index = 0;
h = DmGetRecord(m_Database, index);
if (h)
{
DBRecordType *p = (DBRecordType *) MemHandleLock(h);
CDataTest l_cDataTest; // <---------------------------- error at this line
FrmCustomAlert(InfoAlert, "OK", NULL, NULL);
MemPtrUnlock(p);
DmReleaseRecord(m_Database, index, true);
}
m_Database.Close();
}
else
FrmCustomAlert(InfoAlert, "Error - Failed to open database", NULL, NULL);
}
i had made sure that CDataTest.cpp is located in the 1st segment... but when i
did that... i got a link error... how do i solve this?
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/