FROM : Brad Bumgarner
DATE : Mon Jul 17 23:49:37 2006
I'm rapidly running out of hair here and the floor around my desk
looking pretty hairy. lol
I'm trying to implement an "autofill" field the same as Mail.app does
in the "To:" token field. I want to be able to input a person's first
name --or-- last name first.
I am currently taking the string and breaking it into component parts
with a space (" ") character as the separator. I am then searching
the Address Book using each component as a possible first name and as
a possible last name. These queries are stored in sets (to eliminate
duplicates).
If there is only one string component the union the 2 sets together.
If there is more than 1 set I intersect them. This works great, BUT
with 2 problems that I haven't been able to eliminate. First is when
a space (" ") is entered, I get NO results back. Second is when one
string component is only 1 character in length. I get more "hits"
then I should.
Does anybody know how the Mail.app does it? (Because unfortunately I
don't and haven't been able to get it right.)
Thanks,
Brad Bumgarner, CTA
DATE : Mon Jul 17 23:49:37 2006
I'm rapidly running out of hair here and the floor around my desk
looking pretty hairy. lol
I'm trying to implement an "autofill" field the same as Mail.app does
in the "To:" token field. I want to be able to input a person's first
name --or-- last name first.
I am currently taking the string and breaking it into component parts
with a space (" ") character as the separator. I am then searching
the Address Book using each component as a possible first name and as
a possible last name. These queries are stored in sets (to eliminate
duplicates).
If there is only one string component the union the 2 sets together.
If there is more than 1 set I intersect them. This works great, BUT
with 2 problems that I haven't been able to eliminate. First is when
a space (" ") is entered, I get NO results back. Second is when one
string component is only 1 character in length. I get more "hits"
then I should.
Does anybody know how the Mail.app does it? (Because unfortunately I
don't and haven't been able to get it right.)
Thanks,
Brad Bumgarner, CTA
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

