yep, that covers it.

I would bet serious money (maybe even five cents) that your problem lies
elsewhere.  The code you use to change the category looks airtight and
independent investigation says that the records are in good shape after you
do it.  But when you go to display things, they are hosed.  Almost certainly
some other piece of code (possibly as a result of that category changed,
potentially a very indirect result, such as an update caused by the dialog's
existence) is trashing some system memory.  There are a number of things
that can be done, such as p = CtlGetLable; StrCopy(p, ..) or FrmCopyTitle()
that can potentially corrupt system memory (if the new label/title is bigger
than the old).  I would try to watch the effected areas of memory while
stepping through program execution to see when they change, but I don't know
if you have access to sufficiently powerful debugging tools (CodeWarrior can
do this) for that approach.

Good Luck (I'm out of ideas)

-bob mckenzie, palmsource pdx

-----Original Message-----
From: Paul Sanders [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 12:56 AM
To: Palm Developer Forum
Subject: Re: Urgent - Category problem


Hi Bob

"DmQueryNextInCategory will return NULL (0) if there is no next record.  I
trust your loop looks for this and terminates in this case"

I hope this is covered by the line

while ((mh = DmQueryNextInCategory(dbPtr, &index, CurrentCat)) != NULL) {

I haven't written in C for quite a few years but it looks ok to me.

I am testing with a list of 50+ items and changing item 2 - so it shouldn't
return NULL, just skip to the next record.


Paul Sanders




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

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

Reply via email to