I can't figure out how to handle key-paths that contain spaces, in NSPredicate 
format strings. There doesn't seem to be any way to escape the space character.

For example, I've got a data set parsed from my iTunes library, so every item 
has a "Total Time" key. How do I write a format string involving this key? I've 
tried:
        'Total Time' < 60000
        Total\ Time < 60000
        Total\x20Time < 60000
None of these work. The first treats 'Total Time' as a string literal not a 
key-path, and the others don't parse at all (even though the Predicate Format 
String Syntax reference says \x is supported.)

I know I can use %K and then plug @"Total Time" in as a parameter, but in this 
case I want the user to be able to type in these format strings, so that's not 
going to work.

—Jens
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to