• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determine keys used in NSPredicate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determine keys used in NSPredicate


  • Subject: Re: Determine keys used in NSPredicate
  • From: Chris Hanson <email@hidden>
  • Date: Sun, 20 Oct 2013 12:14:42 -0700

On Oct 19, 2013, at 9:44 PM, Trygve Inda <email@hidden> wrote:
> How can I look at myPredicate and determine that it uses dynamicPropertyA?
>
> Is it enough  and safe to use [myPredicate predicateFormat] and then search
> the resulting string for dynamicPropertyA?

Once you have an NSPredicate, you can use the various methods on it and its subclasses to recourse through the predicate and find any key path expression objects, and get the key paths they use.

Doing so doesn't rely on the result of -predicateFormat and it uses entirely public API.

  -- Chris
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Determine keys used in NSPredicate (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: Setting key equivalent for menus depending on window
  • Next by Date: Re: Setting key equivalent for menus depending on window
  • Previous by thread: Re: Determine keys used in NSPredicate
  • Next by thread: How to change highlight colour on NSTableView row
  • Index(es):
    • Date
    • Thread