[comp.sys.mac.hypercard] Field specific Find buttons

feo@lll-crg.llnl.gov (John Feo) (06/23/88)

Does anyone know how to write a script for a Find button to search in
a specific field. For example, say I have fields A, B, and C and I want
to associate a Find button with each field so that the button associated
with Field A searches only Field A, the one associated with Field B only
searches Field B, etc.

Thanks, John

kurtzman@pollux.usc.edu (Stephen Kurtzman) (06/23/88)

In article <8916@lll-winken.llnl.gov> feo@lll-crg.llnl.gov.UUCP (John Feo) writes:
>Does anyone know how to write a script for a Find button to search in
>a specific field. For example, say I have fields A, B, and C and I want
>to associate a Find button with each field so that the button associated
>with Field A searches only Field A, the one associated with Field B only
>searches Field B, etc.

You should be able to do this by having the script ask for the data to
be found and then using something like:
     find it in field x
where x is the number of the field you are searching.

I'll take this opportunity to throw an item from my HC wishlist to the
Apple HC developers: I want to be able to do the following:

(1)    find foo in background field "Item" of background "Information Card"

Currently, find searchs all backgrounds.

Alternatitively I would like to be able to say

(2)    find foo in background field "Item"

and have that work. It appears that HC translates `background field "Item"'
into a background field number or something. Anyway, it does not search only
in background fields with the name "Item".

Note that (1) and (2) are different, but with judicious naming of fields,
the effect (1) could be accomplished with (2).