Right off hand, myfieldhandle is not a CharPtr as you are using it in your
code.  It's a handle.
According to your code snippet, you should be using fldP as the CharPtr to
pass to CtlSetLabel.

DeAnna

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Eliah
> NInyo
> Sent: Tuesday, December 19, 2000 7:34 AM
> To: Palm Developer Forum
> Subject: how to set a label to a trigger...?
>
>
> hello,
>
> i have a field with a trigger resource and a list attach to
> it (as u can see
> i use CW6R and constructor). i want to set the label of the
> trigger to " tap
> here to change".
> i already have the trigger pointer (let's call it - trgP) and
> i have made
> the copy by using
> CtlSetLabel ( trgP, (CharPtr)myfieldHandle );
>
> myfieldHandle it's one of my field which i create by
> MemHandleNew (with the
> size i define) and after that i lock a poiter to it - (CharPtr)fldP =
> (CharPtr)MemHandleLock (myfieldHandle).
> then i make - StrCopy ( fldP, "tap here to change"); and
> finally i unlock
> the fldP. (with MemPtrUnlock).
>
> my application crashes when ever it gets to the line -
> CtlSetLabel ( trgP,
> (CharPtr)myfieldHandle );
>
>
> any suggestions??
>
> tnx in advance :-)
>
>
>
> --
> For information on using the Palm Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
>


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

Reply via email to