thks, manikumar
>From: "manikumar" <[EMAIL PROTECTED]>
>Reply-To: "Palm Developer Forum" <[EMAIL PROTECTED]>
>To: "Palm Developer Forum" <[EMAIL PROTECTED]>
>Subject: Re: LIST Error!
>Date: Thu, 24 May 2001 02:31:02 -0700
>
>Hi,
>
>Try to release the memory once it is out of scope using the functions
> MemPtrFree and MemHandleFree
>
>And check the return value of MemPtrNew and MemHandleNew (whether you are
>getting allocation) for NULL. If you are getting any Pointer or Handle with
>NULL return value and trying to use the pointer or Handle will give you the
>error.
>for example:
>
>MemHandle handle;
>handle=MemHandleNew(10);
>if(handle==NULL)
>{
> FrmAlert(AlertId) ; /* AlertId is Resource ID of Alert created using
>Constructor */
>}
>
>Thanks
> Manikumar K
>--------------------------------------------------------------------
>Developers' Nation
>You've got the questions; we've got the answers.
>Visit Us At :http://www.devnation.net for Palm Developer Support
>--------------------------------------------------------------------
>
>"Ai Lee Tang" <[EMAIL PROTECTED]> wrote in message
>news:50191@palm-dev-forum...
> >
> > hi all,
> >
> > I got an error message - "NULL Handle". I do not know what happened to
>the
> > list control. It is really strange whereby it does not happen very time
>when
> > i clicked on the trigger button. First few times is running well, but
>when
> > it reach certain times or maximum transaction, i will get this error.
> >
> > Another thing is, do i have to release the list whenever i pick a choice
> > from the list?
> >
> > The source code as below:
> >
> >
> > for(i = 0; i < listIndex; i++)
> > {
> > file://get all the product code and description
> > ProductGetRecord (PriceDB, i, &recordP, &recordH);
> > productcodeP = MemPtrNew(StrLen (recordP.amount) +
>StrLen(recordP.vendor)
>+
> > 3);
> > StrCopy (productcodeP, recordP.amount);
> > StrCat (productcodeP, "@");
> > StrCat(productcodeP,recordP.vendor);
> > listItems[i] = productcodeP;
> > MemHandleUnlock(recordH);
> > }
> >
> > LstSetListChoices(lst,listItems,listIndex);
> > LstSetHeight(lst,8);
> > LstSetSelection(lst,selection);
> >
> > if (selection != noListSelection)
> > LstMakeItemVisible(lst,selection);
> >
> >
> >
> >
> > ---
> >
> > This server is using the evaluation version of the Newsgroups
> > Interface, making messages limited to 1000 characters. This limitation
> > can be removed by upgrading to MultiView.
> > See http://www.lyris.com/ for upgrade information.
> >
> >
>
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe,
>please see http://www.palmos.com/dev/tech/support/forums/
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/