Status: confirmed Severity: enhance Category: Metakit OOMK Created: 2008-01-22 Updated: 2008-02-24

I set up a small database with OOMK. I wanted to check whether an entry was already present before I add it; if it is present I don't want to add a new copy.

So I check whether it is present with

$pk FIND name $thisname

and it it is not present it throws an error. I must catch the error so I can close the view etc.

I'm finding this tedious. I'd much rather just have something simple, like perhaps return the row# if it's found and a -1 if it isn't found. Perhaps it's only that I don't see the true simplicity of the current approach, but being able to avoid the error looks easier to me in my particular circumstance.



2008-01-22 J Thomas

Created

2008-02-24 jcw

Agreed. Too late to change the API like that now, I suggest using a small wrapper to avoid the need for catch in your code.

2008-02-24 jcw

(Changed: stat)

Add a comment:

Tip: add empty lines between paragraphs and indent lines to prevent reformatting.

Your name or initials: