No, that doesn't work.  "*fldText" will evaluate to the Char that "fldText" points to. 
 I think that you need to remove the "*".  And if it were my program, I'd also be 
error checking the results of FrmGetObjectIndex, FrmGetObjectPtr, and FldGetTextPtr 
(and probably be making sure that m_pForm wasn't NULL).

-- Keith

At 12:28 PM +0530 11/4/02, Sateesh Kumar E C wrote:
>You have to do like this:
>
>Char *fldText ;
>fldPtr = FrmGetObjectPtr(thisForm , FrmGetObjectIndex(m_pForm,controlID));
>*fldText = FldGetTextPtr(fldPtr);
>StrCopy(strBig, fldText)
>
>       Regards,
>       Sateesh
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:bounce-palm-dev-forum-56359@;news.palmos.com]On Behalf Of
>Jayanarayanan M N
>Sent: Monday, November 04, 2002 12:24 PM
>To: Palm Developer Forum
>Subject: StrCopy gives exception
>
>
>I am trying to copy value from a field to local character array.
>
>fldPtr = FrmGetObjectPtr( thisForm , FrmGetObjectIndex( m_pForm,
>controlID ));
>StrCopy ( strBig,  fldPtr )
>
>Gives warning  on emulator.
>"...just read from memory location 0x000139E7, which is in an
>unallocated chunk of memory."
>
>If clicked to continue, programs continues in normal way. Can I ignore this?
>What could be the cause?
>
>regards
>Jayan

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

Reply via email to