Can any one help?
I write a function for copy the content in record into a structure, then
edit the content and save it back to database by "DmAttachRecord"
:
:
err = RecordGet (gDb, gCurrRecord, &record);
ErrNonFatalDisplayIf (err, "Record not found");
item.DevName = FldGetTextPtr (GetObjectPtr(EditField1Field));
item.DevID = FldGetTextPtr (GetObjectPtr(EditField2Field));
item.DevType = record.DevType;
item.SysType = record.SysType;
item.StatusLen = record.StatusLen;
item.Valid = record.Valid;
MemMove(item.HexID, record.HexID, HexNum);
MemMove(item.Security, record.Security, HexNum);
MemMove(item.DevStatus, record.DevStatus, record.StatusLen); <--
:
:
and my sructure is like this
typedef struct
{
UInt8 SysType;
UInt8 DevType;
UInt16 GroupID;
Boolean Valid;
UInt16 StatusLen;
UInt8 HexID[HexNum];
UInt8 Security[SenNum];
CharPtr DevName;
CharPtr DevID;
CharPtr DevStatus;
} dbRecordItemType
everytime when the sentense i point out (<--) "MemMove(item.DevStatus,
record.DevStatus, record.StatusLen); " included. SysFatalAlert came out.
"My app" called SysFatalAlert with the messages:"Window.c, Line:3826,Bad
window".
if i remark it the program work nicely.
am i using the wrong method the handle the copying or what can i do of that.
when i choose "debug" another alert box came out
"Debugger trap exception at 0x10C18386 (ErrDisplayFileLineMsg)"
Please help me in advance. Thank You.
Keith
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/