> From: Jason Henderson [mailto:[EMAIL PROTECTED]]
> I am trying to put the global find functionality into my app  [...]
> 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?

Well I do see some suspicious things in the code:

> CApptDBConnection* pApptDB = new CApptDBConnection;

Do you have a custom version of operator new?  In CodeWarrior (though you
don't say which toolset you are using) the default operator new has some
exception logic which (I believe) requires global variables.  That wouldn't
work right in a no-globals launch code such as Find.

> dbP = pApptDB->GetDmOpenRef();

Virtual functions don't work without globals either, so
CApptDBConnection::GetDmOpenRef needs to be non virtual.

> // display the heading line
> header = (CharPtr) MemPtrNew(21);
> StrCopy(header, "EagleSoft - Schedule");
> done = FindDrawHeader(findParams, header);
> MemPtrFree(header);

Why the memory allocation?  Why not just use one line:

    done = FindDrawHeader( findParams, "EagleSoft - Schedule" );

-slj-


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