Creating an NSExpression with a keypath and variable

2011-03-16 Thread Kyle Sluder
Hi all, Is it really impossible to create an NSExpression of the form $variableName.someKeyPath? I can create an NSExpression for $variableName, and I can create an NSExpression for someKeyPath, but I can't create one that contains both. The actual problem is that I'm trying to create an

Re: Creating an NSExpression with a keypath and variable

2011-03-16 Thread Dave DeLong
Directly, yes. NSExpression stores a keypath as a single string, whereas variables are store in their own kind of NSExpression object. When you replace variables with new values, it's only looking for the certain kinds of NSExpression objects to replace. Everything else stays the same. Some

Re: Creating an NSExpression with a keypath and variable

2011-03-16 Thread Dave DeLong
On Mar 16, 2011, at 11:28 AM, Dave DeLong wrote: - If you want to use a keypath with a variable, you could do: FUNCTION($x, 'text') CONTAINS[cd] $searchString Or put another way: FUNCTION($x, 'valueForKeyPath:', 'foo.bar.baz') Dave ___

Re: Creating an NSExpression with a keypath and variable

2011-03-16 Thread Kyle Sluder
On Wed, Mar 16, 2011 at 11:28 AM, Dave DeLong davedel...@me.com wrote: Directly, yes.  NSExpression stores a keypath as a single string, whereas variables are store in their own kind of NSExpression object.  When you replace variables with new values, it's only looking for the certain kinds