You are correct.  Any label you set into a control w/ CtlSetLabel()
MUST remain in scope while the control does.  If the label is one
you created w/ MemHandleNew/MemHandleLock/StrCopy it
MUST remain LOCKED while the control is using it.

--
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi/sec: not just a good idea, it's the LAW!


Matt Mason wrote in message <34032@palm-dev-forum>...
>
>Well, I set the label during an edit of a record.  When the user taps save
I
>go gather all the info and I update the record.  Part of the gather is
>CtlGetLabel.  I think it is because I am not locking the pointer that I set
>the label with when the form opens.  By the time I get it, the pointer is
no
>longer any good.
>
>Richard Burmeister <[EMAIL PROTECTED]> wrote in message
>news:34023@palm-dev-forum...
>>
>> If the user hasn't tapped on the popup trigger, why are you trying to get
>> its label?  Normally, your code responds to events the OS generates.  For
>> example, with a  popup trigger associated with a list, you get a
>> popSelectEvent and respond to that.  If you want the label to have an
>> initial value, use CtlSetLabel() in your MainFormInit().  Since the OS
>sets
>> the trigger label when the user selects an item from the list, you don't
>> need to use CtlGetLabel() -- just look at
eventP->data.popSelect.selection
>> when you get the popSelectEvent.
>>
>> If your popup trigger isn't attached to a list, explain what you are
>trying
>> to do with it and then maybe I'll be able to give some assistance with
>that.
>>
>> ----- Original Message -----
>> From: "Matt Mason" <[EMAIL PROTECTED]>
>> Newsgroups: palm-dev-forum
>> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
>> Sent: Tuesday, December 26, 2000 12:32 AM
>> Subject: Re: Triggers Dirty
>>
>>
>> > The real problem seems to occur when I do not actually touch a popup
>> Trigger
>> > and then CtlGetLabel returns an empty pointer.  I get a good pointer if
>I
>> > have actually touched the popup.  Should I be using a different
function
>> to
>> > get the value?
>> >
>> > Richard Burmeister <[EMAIL PROTECTED]> wrote in message
>> > news:33999@palm-dev-forum...
>> > >
>> > > From: "Matt Mason" <[EMAIL PROTECTED]>
>> > >
>> > > > Is there a function that I cannot find that checks to see if a
>trigger
>> > is
>> > > > dirty? FrmGetObjectPtr does't seem to be detecting if the field has
>> > > changed.
>> > >
>> > > Are you referring to a popup trigger associated with a list?  Your
app
>> > gets
>> > > a popSelectEvent when an item on the list is tapped.  In your
>> > > MainFormHandleEvent, when you get a popSelectEvent you can look at
>> > > eventP->data.popSelect.selection to see which list item was selected,
>> and
>> > > you can inspect eventP->data.popSelect.priorselection if you need to
>> know
>> > > which list item was previously selected.
>> >
>> >
>> >
>> >
>> > --
>> > 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