I have been running into an error (accessing memory which is no longer allocated) when using POL::CField and calling the Replace routine. Best I can tell, this happens when I have an active insertion point in the field and I replace the field's text. Replace() calls FldDrawField() which in turn calls an internal routine SetBlinkingInsPtLocation() which is where the failure is happening at. I added a call to ReleaseFocus() to the Replace() code, which seems to resolve the problem. A snippet of code is below showing the added line.

Has anyone else had similar problems?

thanks,

Scott Schmitz
RealtyJuggler, Inc.

void CField::Replace(const Char* pszInsChars, UInt16 wInsLength)
{
POL_CHECK(m_pField == NULL, "CField: Field is not attached");
ReleaseFocus(); // SDS added as I get an error in FldDrawField() in the internal routine SetBlinkingInsPtLocation()
// when I call Replace on a field which already has text in it and an active insertion point.



-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to