Re: Determine keys used in NSPredicate

2013-10-20 Thread Chris Hanson
On Oct 19, 2013, at 9:44 PM, Trygve Inda 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

Re: Determine keys used in NSPredicate

2013-10-19 Thread Ken Thomases
On Oct 20, 2013, at 12:27 AM, Trygve Inda wrote: > My question is: After I have an NSPredicate built by the user with the > Predicate editor, how can determine the keys that the NSPredicate uses? You need to traverse the hierarchy of objects represented by the predicate. The NSPredicate you have

Re: Determine keys used in NSPredicate

2013-10-19 Thread Trygve Inda
> On Oct 19, 2013, at 10:44 PM, Trygve Inda wrote: > >> I have an array of objects. These objects may have some dynamic properties >> handled with valueForUndefinedKey. >> >> If I create a predicate along the lines of: >> >> myObject.proertyA = something AND >> myObject.proertyB = somethingElse

Re: Determine keys used in NSPredicate

2013-10-19 Thread Keary Suska
On Oct 19, 2013, at 10:44 PM, Trygve Inda wrote: > I have an array of objects. These objects may have some dynamic properties > handled with valueForUndefinedKey. > > If I create a predicate along the lines of: > > myObject.proertyA = something AND > myObject.proertyB = somethingElse AND > myObj

Determine keys used in NSPredicate

2013-10-19 Thread Trygve Inda
I have an array of objects. These objects may have some dynamic properties handled with valueForUndefinedKey. If I create a predicate along the lines of: myObject.proertyA = something AND myObject.proertyB = somethingElse AND myObject.dynamicPropertyA = someOtherThing How can I look at myPredic