Hi,

I need to maintain a sorted array with no duplicates. Here is what I do

class CMyObj
{
...
HBufC* iName; // or TBuf<>, the same effects

}

CArrayPtrSeg<CMyObj> iArray;

TInt CMyArray::Add(CMyObj* obj)
{
TInt result = KErrNoMemory;

if(iArray!=NULL)
{
TKeyArrayFix Key(_FOFF(CMyObj,iName),ECmpFolded);
TRAP(result, result = iArray->InsertIsqL(obj,Key));
}

return result;
}


But my app ends with panic USER 7 when is constructing the key.
Why?