Thank you for the heads up on the field handle. It saved me from having to figure that out later!
As for the reset variable problem, I found the error. I believe it had to do with the fact that I accidentally made my global variables static. A stupid mistake I should have found much earlier, but it gave me a chance to look over my code and find a few other mistakes I had made. Thank you very much for all your help, it was greatly appreciated. Sandra Webb "Robert McKenzie" <[EMAIL PROTECTED]> wrote in message news:69024@palm-dev-forum... > > I'm not sure what might be going on with your UInt. If it is declared in a > header which is included in multiple source files (one for Form1 and one for > Form2, there could be two different (local) globals under the same name. I > would check its address to verify/eliminate this possibility. A second > possibility is that flaky CodeWarrior is simply mis-reporting its value. A > third possibility is that your application is running in a context where it > doesn't have access to globals, though if this is the cause, I would expect > it to crash rather than give the symptoms that you report. > > A second (possibly relevant) point is that if you are attempting to save a > locked pointer to a field and the field still has a handle to that memory, > the field will free that memory on form close, invalidating the pointer. In > general, when getting data out of a field and attempting to retain it, you > should get the field's handle and then reset the field's handle to NULL so > that the field will no longer muck with the (just-extracted) data. Of > course, an alternate strategy that will work is to copy the field's data > into separate storage that you maintain. > > -bob mckenzie, palm pdx -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
