i get an error in pose that says i am reading from or writing to memory
manager data structures.  it happens when i use the following function:

static void SetFieldInt(Int fieldID, UInt value) 
{
        FieldPtr fld;
        CharPtr strP;
        FormPtr frm = FrmGetActiveForm();
        
        strP=MemPtrNew(sizeof(CharPtr));
        StrIToA(strP, value);
        fld = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, fieldID));
        FldDelete(fld, 0, FldGetTextLength(fld));
        FldInsert(fld, strP, StrLen(strP));
        MemPtrFree(strP);
}


i use this same function on another form in my app, but i never get this
error.  i have looked and looked, but i cannot figure this out.

three questions:
1.  anyone know what this memory manager data structures bit is about?
2.  can this function be causing this?
3.  why does it never happen in the other form?

this error only happens infrequently, and doesnt cause any damage if i
select to continue through it.  strange.

:P

Reply via email to