I have taken the calls to my classes out but I am still having problems with
the recordNum variable.
If I do not use it anywhere in the function it gets initialized to 0, but as
soon as I try to set it equal to findParams->recordNum, its value becomes
65535.

Can someone give me some source code using multiple databases or give me a
clue as to what is happening here?

Thanks

"Jason Henderson" <[EMAIL PROTECTED]> wrote in message
news:34676@palm-dev-forum...
>
> I am trying to put the global find functionality into my app, and I am
using
> the code from The Developer's Guide book.  Everytime I debug into it and
> look at the UInt recordNum variable, its value is 65355 even after
> initializing it to 0 and setting it equal to findParams->recordNum.  What
> the heck is going on?!  Does this have something to do with the no global
> variables rule when using the find?  If so, what's the workaround?
>
> code snippet:
>
> void GlobalFind(FindParamsPtr findParams)
> {
>  Err err;
>  Word pos;
>  UInt fieldNum;
>  UInt cardNo = 0;
>  CharPtr header;
>  Boolean done;
>  VoidHand recordH;
>  LocalID dbID;
>  RectangleType r;
>  DmSearchStateType searchState;
>
>  DmOpenRef dbP;
> UInt recordNum= 0;
>
>  findParams->more = false;
>
>  // find the application's data file
>  err = DmGetNextDatabaseByTypeCreator(true, &searchState, APPT_DB_TYPE,
> APP_FILE_CREATOR,
>   true, &cardNo, &dbID);
>  if (err) return;
>
>  // open the schedule database
>  CApptDBConnection* pApptDB = new CApptDBConnection;
>  if (!pApptDB) return;
>
>  dbP = pApptDB->GetDmOpenRef();
>
>  // display the heading line
>  header = (CharPtr) MemPtrNew(21);
>  StrCopy(header, "EagleSoft - Schedule");
>  done = FindDrawHeader(findParams, header);
>  MemPtrFree(header);
>
>  if (done)
>   findParams->more = true;
>  else
>  {
>   // search all of the fields; start from last record searched
>   recordNum = findParams->recordNum;  // this doesn't seem to work???
>
>   for(;;)
>   {...
>
> Thanks!
>
>
>
>



-- 
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