Platforms to show: All Mac Windows Linux Cross-Platform
NSPredicateMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | iCloud | MBS MacCloud Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
You use predicates to represent logical conditions, used for describing objects in persistent stores and in-memory filtering of objects. Although it is common to create predicates directly from instances of NSComparisonPredicate, NSCompoundPredicate, and NSExpression, you often create predicates from a format string which is parsed by the class methods on NSPredicate. Examples of predicate format strings include:
- Simple comparisons, such as grade == "7" or firstName like "Shaffiq"
- Case and diacritic insensitive lookups, such as name contains[cd] "itroen"
- Logical operations, such as (firstName like "Mark") OR (lastName like "Adderley")
- In Mac OS X v10.5 and later, you can create between predicates such as date between {$YESTERDAY, $TOMORROW}.
You can create predicates for relationships, such as:
- group.name like "work*"
- ALL children.age > 12
- ANY children.age > 12
You can create predicates for operations, such as @sum.items.price < 1000. For a complete syntax reference, refer to the Predicate Programming Guide:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Predicates/predicates.html#//apple_ref/doc/uid/TP40001789
- property Handle as Integer
- 6 methods
- method Constructor(predicateFormat as string)
- method Constructor(predicateFormat as string, arguments() as Variant)
- method Constructor(value as boolean)
- method description as string
- method predicateFormat as string
- method Print
- 3 shared methods
- shared method predicateWithFormat(predicateFormat as string) as NSPredicateMBS
- shared method predicateWithFormat(predicateFormat as string, arguments() as Variant) as NSPredicateMBS
- shared method predicateWithValue(value as boolean) as NSPredicateMBS
Sub classes:
Some methods using this class:
- CNContactStoreMBS.containersMatchingPredicate(predicate as NSPredicateMBS, byref error as NSErrorMBS) as CNContainerMBS()
- CNGroupMBS.predicateForSubgroupsInGroupWithIdentifier(contactIdentifier as String) as NSPredicateMBS
- EKEventStoreMBS.enumerateEventsMatchingPredicate(predicate as NSPredicateMBS, tag as Variant = nil)
- EKEventStoreMBS.fetchRemindersMatchingPredicate(predicate as NSPredicateMBS, tag as Variant = nil) as EKFetchRequestMBS
- EKEventStoreMBS.predicateForCompletedRemindersWithCompletionDate(startDate as dateTime, endDate as dateTime) as NSPredicateMBS
- EKEventStoreMBS.predicateForEvents(startDate as date, endDate as date) as NSPredicateMBS
- EKEventStoreMBS.predicateForEvents(startDate as date, endDate as date, calendars() as EKCalendarMBS) as NSPredicateMBS
- EKEventStoreMBS.predicateForIncompleteRemindersWithDueDate(startDate as date, endDate as date) as NSPredicateMBS
- EKEventStoreMBS.predicateForIncompleteRemindersWithDueDate(startDate as dateTime, endDate as dateTime) as NSPredicateMBS
- NSCompoundPredicateMBS.subpredicates as NSPredicateMBS()
Some properties using for this class:
- CKQueryMBS.predicate as NSPredicateMBS
- CKQuerySubscriptionMBS.predicate as NSPredicateMBS
- CKSubscriptionMBS.predicate as NSPredicateMBS
- CNContactFetchRequestMBS.predicate as NSPredicateMBS
- CNContactPickerViewControllerMBS.predicateForEnablingContact as NSPredicateMBS
- CNContactPickerViewControllerMBS.predicateForSelectionOfContact as NSPredicateMBS
- CNContactPickerViewControllerMBS.predicateForSelectionOfProperty as NSPredicateMBS
- EKParticipantMBS.contactPredicate as NSPredicateMBS
- PHFetchOptionsMBS.predicate as NSPredicateMBS
- NSMetadataQueryMBS.predicate as NSPredicateMBS
Some events using this class:
- EKEventStoreMBS.enumerateEventsMatchingPredicateUpdate(e as EKEventMBS, byref stop as boolean, predicate as NSPredicateMBS, tag as Variant)
- EKEventStoreMBS.eventsMatchingPredicateAsyncCompleted(events() as EKEventMBS, predicate as NSPredicateMBS, tag as Variant)
- EKEventStoreMBS.fetchRemindersMatchingPredicateCompleted(reminders() as EKReminderMBS, predicate as NSPredicateMBS, tag as Variant)
Some examples using this class:
- /Mac64bit/Contacts/Contacts Display Person
- /Mac64bit/EventKit/EventKit
- /Mac64bit/EventKit/MBS iOS EventKit demo
- /MacCloud/iCloud Example/iCloud Example
- /MacCloud/NSMetadataquery test
Blog Entries
The items on this page are in the following plugins: MBS MacCloud Plugin.
NSPopUpButtonMBS - NSPrinterMBS