Thanks for the response, It's a bit more than that - when I set a debug breakpoint, the correct number is retrieved, processed by the AppDoubleToStr and copied to the field (where it's visible on screen)

If I don't have the breakpoint, then either 0 or 1 is processed by AppDoubleToStr and copied to the field (where it's visible on screen)

As you can see, the variable is used in the following three lines (and then never again)



On Thu, 20 Apr 2006 12:42:41 +0100, <[EMAIL PROTECTED]> wrote:

look if you are using global optimization,

CW put 2 (or mor) variables in the same address if one of them will not be used later.

when you debug looks like the variable changes.

one solution is use this variable for something later in the function so CW have to preserve the address of the variable unique.

other option is declare variable as static or volatile.

Ricardo
----- Original Message ----- From: "Rob" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[email protected]>
Sent: Thursday, April 20, 2006 6:41 AM
Subject: More NVFS Wierdness?


Hi,

I have a snippet of code to get the modification number of a database that I've saved to the treo's nvfs volume

error=VFSFileOpen (volRefNum,PREFS_BACKUP,vfsModeRead,&fileRef); if (!error)
{
VFSFileDBInfo (fileRef,NULL,NULL,NULL,&dateNum,NULL,NULL,&modNum,NULL,NULL,NULL,NULL,NULL);
VFSFileClose(fileRef);

AppDoubleToStr(disp,modNum,0);
AppCopyTextToField(frmP,BackupBackupModField,disp,false); }

if I put a debug point on VFSFileDBInfo then it returns the correct value. If I clear the debug point and stop a couple of lines later, it returns 0 or 1 (for modnum). This is the same build running in the same debug session, the only thing changing is that I turn the breakpoint on and off in codewarrior

I have repeated this many times to be sure.

I've tried putting a SysTaskDelay before and after VFSFileDBInfo (50ticks)

Any ideas?

Thanks in advance,

Rob

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









--
---------------------------------------
Check out www.WifiTastic.com
$80 gets you a commercial-quality wifi hotspot which pays out much more than a commercial hotspot!
You set the rates.
You decide who gets free access.
We make it Granny-Simple!

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

Reply via email to