Thanks For the suggestion Ben. However, I found out that this wasn't the
solution to my problem though.
However, I found the source code of the standard apps (ToDo, Memo) and I
took a peek at how the find command was implemented there.

There I learned that I had add the following two lines to my code:
params->lineNumber++;
params->more = false;

After that, there was no need for a database entry anymore.

> -----Original Message-----
> From: Palm Developers Forum List [mailto:[EMAIL PROTECTED]]
> Sent: woensdag 17 november 1999 7:59
> To: Palm Developers Forum List
> Subject: Palm Dev Forum Digest 11/16/99
> 
> 
> Date: 16 Nov 1999 08:34:59 -0800
> From: Ben Darnell <[EMAIL PROTECTED]>
> Subject: Re: Pseudo Find Action
> 
> On Tue, Nov 16, 1999 at 05:16:13PM +0100, Vereecke Jan wrote:
> > If yes, is there a way to trick this function into 
> accepting some set of
> > parameters even without an actual database existing ?
> 
> Why not just use your application database?  It exists; the OS doesn't
> really care about any more than that.
> 
> - -Ben
> - -- 
> Ben Darnell              [EMAIL PROTECTED]
> http://www4.ncsu.edu/~bgdarnel/thoughtstream/
> 
> Date: 16 Nov 1999 08:23:24 -0800
> From: Vereecke Jan <[EMAIL PROTECTED]>
> Subject: Pseudo Find Action
> 
> I have an application without an associated database. 
> However, I still want
> the application to respond to a global find action 
> sysAppLaunchCmdFind and
> sysAppLaunchCmdFindGoto.
> 
> I was able to do this with the following code:
> 
> void PseudoFind(FindParamsPtr params)
> {
>    const int dummyCardNo=0;
>    RectangleType rect;
>    char String[longDateStrLength];
>    SystemPreferencesType prefs;
>    
>    if (/* params->strAsTyped is according to certain conditions */)
>    {
>       if (params->more ? FindDrawHeader(params, "AppName(cont)") :
> FindDrawHeader(params, "AppName"))
>          return;
> 
>       if (FindSaveMatch (params, year, 0, 0, 0, dummyCardNo,
> DmNumDatabases(dummyCardNo)))
>          return;
> 
>       /* initialize String */
>       FindGetLineBounds(params, &rect);
>       WinDrawChars(String, StrLen(String), rect.topLeft.x, 
> rect.topLeft.y);
>    }
> }
> 
> This goes fine, except that the line that I output in the 
> Find dialog is
> overwritten by the FindDrawHeader call of the next 
> application queried. I
> guess that the problem is that the OS doesn't see that I have 
> 'found' an
> item.
> I guessed that telling the OS that there is a match must happen with
> FindSaveMatch, but is this really so ?
> If yes, is there a way to trick this function into accepting 
> some set of
> parameters even without an actual database existing ?
> 
> 
> 

Reply via email to