Re: filtering the values in an NSTableColumn
Re: filtering the values in an NSTableColumn
- Subject: Re: filtering the values in an NSTableColumn
- From: Koen van der Drift <email@hidden>
- Date: Fri, 10 Aug 2012 10:58:57 -0400
Yeah, I saw the BETWEEN a bit later, I'll go ahead and try that. Or
maybe turn my float into an NSNumber, I need to think how that works
with the rest of my model.
- Koen.
On Fri, Aug 10, 2012 at 10:51 AM, Fritz Anderson
<email@hidden> wrote:
> On 10 Aug 2012, at 7:48 AM, Koen van der Drift <email@hidden> wrote:
>
>> On Fri, Aug 10, 2012 at 8:42 AM, Keary Suska <email@hidden> wrote:
>>>
>>
>>> Where in the predicate formatting guide (https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Predicates/predicates.html) does it show that your syntax is in any way valid?
>>
>> Well, it talks about using the greater than comparator in the Using
>> Predicates section:
>>
>> NSDate *referenceDate = [NSDate dateWithTimeIntervalSince1970:0];
>> NSPredicate *predicate = [NSPredicate predicateWithFormat:@"birthday >
>> %@", referenceDate];
>
> Notice two differences between the documented example and the predicate you propose:
>
> - The format specification in the example is %@, not a scalar. ("%@ is a var arg substitution for an object value—often a string, number, or date.")
>
> - The predicate in the documentation does not chain binary comparisons. The documentation doesn't show any operator precedence — even if legal, your proposal might be read as [[%f < value] < %f]. It _does_ show a "BETWEEN" operator.
>
> — F
>
_______________________________________________
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