Predicates in Interface Builder
Predicates in Interface Builder
- Subject: Predicates in Interface Builder
- From: Donald Smith <email@hidden>
- Date: Thu, 17 May 2007 20:10:34 -0400
I am working on a Cocoa application which has a NSTableView of
records (some class). One of the columns of data (A) is an NSNumber
which is an numeric reference to another record in the table. Each
record has a name column (B) which is an NSString. I have an
NSArrayController whose content is set to my array of data records.
Everything display in the table OK.
I have created an NSValueTransformer class that transforms between
the index number (A) and the string name (B) it references, so that
the reference column displays the other records name instead of just
a number, Everything works just fine still.
However now I want to set up a search predicate in a NSSearchField
using bindings so I can filter the table contents on column (A) as
well as (B). Before I could filter column (A) as an NSNumber by using
columnA.description contains[c] $value as the predicate format via
Interface Builder.
Now I want to filter based on the string value that is displayed in
column (A) as a result of using the transformer, but I haven't been
able to figure out how to do it. Any help would be greatly appreciated.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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