MBS Contacts Display Person Example - not working with multiple words

@Christian

I am using the example Contacts Display Person from MBS plugins v21.1. The example crashes with a nil object exception when typing in more than one word in the search field. Commenting out the NOE cause shows that no error is detected in the search. Both the matchingPredicate and the fetchRequest examples return zero contacts.

Single name searches work fine.

It seems that the section of code that splits the search text into parts is unnecessary, and should be replaced simply with:

predicate = CNContactMBS.predicateForContactsMatchingName(namefield.Text)

Thanks, we’ll fix this.
I think just checking for p = nil makes it work.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.